Quantitative transaction strategy processing method, device and equipment
By deploying quantitative trading strategy components in cloud services and communicating with them using proxy services and data pipelines, the problem of insufficient convenience of quantitative trading strategies is solved, and efficient and secure operation management and resource utilization are achieved.
Patent Information
- Application Number
- CN202510723042.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-10-17
AI Technical Summary
In existing technologies, quantitative trading strategies suffer from insufficient ease of operation and use, and when relying on local devices, they face limitations in computing resources and network environment, resulting in high management and maintenance requirements.
The quantitative trading strategy components are deployed to cloud services for operation and management. A proxy service is used as a relay to simplify communication between the quantitative management client and the quantitative process. Data pipelines are used for bidirectional communication to reduce the implementation and maintenance costs of long connections.
It improves the ease of operation of quantitative trading strategies, ensures efficient resource utilization, reduces operating costs, enhances system availability and security, simplifies management processes, and improves user experience.
Smart Images

Figure CN120807142A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of cloud computing, and in particular, to a quantitative trading strategy processing method, device and equipment. BACKGROUND
[0002] Quantitative trading refers to a process of completing transactions based on a pre-prepared quantitative trading strategy by using computer technology. Quantitative trading can reduce the influence of investor emotional fluctuations on transactions and avoid making irrational investment decisions in the case of market frenzy or pessimism. A quantitative trading strategy refers to a trading method of making transaction decisions by using historical market data and real-time market data as well as predetermined rules and algorithms through mathematical models and statistical analysis. Therefore, how to run and operate quantitative trading is a technical problem to be solved by the present application. SUMMARY
[0003] The present application provides a quantitative trading strategy processing method, device and equipment, which can improve the convenience of running and operating quantitative trading strategies.
[0004] In a first aspect, the present application provides a quantitative trading strategy processing method, comprising: starting an agent service and a target quantitative process in a strategy running container, wherein the target quantitative process is used to run a target quantitative trading strategy; receiving a quantitative strategy operation request sent by a quantitative management client based on the agent service, and forwarding the quantitative strategy operation request to the target quantitative process through a first data pipeline, so that the target quantitative process performs corresponding operations on the target quantitative trading strategy according to the quantitative strategy operation request; and obtaining a quantitative strategy operation response of the target quantitative process through a second data pipeline, and forwarding the quantitative strategy operation response to the quantitative management client based on the agent service.
[0005] In a second aspect, the present application provides a quantitative trading strategy processing device, comprising: a first starting module configured to start an agent service and a target quantitative process in a strategy running container, wherein the target quantitative process is used to run a target quantitative trading strategy; a first forwarding module configured to receive a quantitative strategy operation request sent by a quantitative management client based on the agent service, and forward the quantitative strategy operation request to the target quantitative process through a first data pipeline, so that the target quantitative process performs corresponding operations on the target quantitative trading strategy according to the quantitative strategy operation request; and a second forwarding module configured to obtain a quantitative strategy operation response of the target quantitative process through a second data pipeline, and forward the quantitative strategy operation response to the quantitative management client based on the agent service.
[0006] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, the memory being configured to store a computer program, and the processor being configured to invoke and run the computer program stored in the memory to execute the method in the first aspect or any implementation manner thereof.
[0007] In a fourth aspect, the present application provides a computer readable storage medium for storing a computer program, the computer program causing a computer to execute the method according to the first aspect or any implementation manner thereof.
[0008] In a fifth aspect, the present application provides a computer program product comprising computer program instructions, the computer program instructions causing a computer to execute the method according to the first aspect or any implementation manner thereof.
[0009] In a sixth aspect, the present application provides a computer program, the computer program causing a computer to execute the method according to the first aspect or any implementation manner thereof.
[0010] Other technical features and effects involved in the technical solutions of the present application will be introduced in subsequent embodiments. To avoid repetition, they will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0011] The drawings used in the embodiment description are introduced as follows.
[0012] Figure 1 An application scenario graph is provided for the embodiments of the present application.
[0013] Figure 2 A schematic diagram of a quantitative transaction strategy processing method is provided for the embodiments of the present application.
[0014] Figure 3 A flowchart of a quantitative transaction strategy processing method is provided for the embodiments of the present application.
[0015] Figure 4 A schematic diagram of another quantitative transaction strategy processing method is provided for the embodiments of the present application.
[0016] Figure 5 A schematic diagram of still another quantitative transaction strategy processing method is provided for the embodiments of the present application.
[0017] Figure 6 A schematic diagram of still another quantitative transaction strategy processing method is provided for the embodiments of the present application.
[0018] Figure 7 A schematic diagram of still another quantitative transaction strategy processing method is provided for the embodiments of the present application.
[0019] Figure 8 A schematic diagram of a quantitative transaction strategy processing device 800 is provided for the embodiments of the present application.
[0020] Figure 9 A schematic block diagram of an electronic device 900 is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0021] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or server including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0023] In one embodiment, the technical solutions of the present application can be used in the processing scene of quantitative trading strategy, and can be applied to the scene of running quantitative trading strategy, for example, starting or stopping the running of quantitative trading strategy, querying the running data (for example, strategy running state, etc.) of quantitative trading strategy, etc., but is not limited thereto.
[0024] An exemplary application scenario provided by the embodiments of the present application is shown in FIG. 1. Figure 1 An exemplary application scenario provided by the embodiments of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the application scenario can include a server and a quantitative management client.
[0025] The server can be a cloud server or a non-cloud server (for example, a server or a server cluster composed of multiple servers), and the application does not limit this. The cloud server can be a cloud platform control center, can also be a cloud service cluster, or can be a cloud platform for arranging and managing containers. For example, a Kubernetes (K8S) cluster, a Docker Swarm, etc. The server can run n containers, specifically, a strategy running container, n is a positive integer, and a quantification process and an agent service can be started in each container. The agent service in each strategy running container can be independent of each other. The agent service is a service process running in a container and can be understood as a kind of server service, that is, a software or application program running on a server, which is used to provide specific functions or resources. Specifically, it can be a communication agent service, which is a relay station for communication between the quantification management client and the quantification process. Since the process of the quantification management client directly accessing the quantification process is relatively complex, the agent service can be used as a relay station to simplify the communication between the quantification management client and the quantification process. The quantification process can be understood as a simple client realized by separating the quantification module in the terminal device, which can be used to run the quantification trading strategy created by the user in the container, and is essentially not much different from the client. Specifically, the quantification trading strategy can be obtained and run through the strategy process in the quantification process.
[0026] The quantification management client specifically runs a strategy running management service and a container management service. The strategy running management service can manage the entire life cycle of the quantification trading strategy running in the strategy running container, including the starting, stopping, and detecting the strategy running state of the quantification trading strategy. Further, the quantification management client can be in communication connection with the user client. The user client is used to provide a visual interface to receive a trigger operation triggered by the user for starting or stopping the running of the quantification trading strategy, and then control the cloud server to start or stop the running of the quantification trading strategy in the strategy running container through the quantification management client.
[0027] Specifically, as Figure 2As shown, the cloud service runs a strategy running container, and the strategy running container starts an agent service and a quantization process; the strategy running management service can pass data to the agent service through a transmission interface based on a remote procedure call protocol (RPC) provided by the agent service, for example, a quantization strategy operation request, wherein the quantization strategy operation request can be a request for starting or stopping the running of a quantization trading strategy, querying the running data (for example, strategy running state, etc.) of the quantization trading strategy, etc. Then, the agent service can receive the quantization strategy operation request and communicate with the quantization process through a data pipeline. Specifically, the agent service can forward the quantization strategy operation request to the quantization process through the named pipe 2, i.e., the first data pipeline; after the quantization process obtains the quantization strategy operation request from the named pipe 2, the quantization process can perform a corresponding operation on the quantization trading strategy according to the quantization strategy operation request, for example, starting the quantization trading strategy, stopping the running of the quantization trading strategy, or querying the running data (for example, strategy running state, etc.) of the quantization trading strategy; then, the quantization process can determine a quantization strategy operation response corresponding to the operation, for example, the quantization strategy operation response can be that starting or stopping the running of the quantization trading strategy is successful or failed, the specific content of the queried strategy running state, or the failure of querying the strategy running state; thereafter, the quantization process can forward the quantization strategy operation response to the agent service through the named pipe 1, i.e., the second data pipeline; the agent service can obtain the quantization strategy operation response from the named pipe 1; finally, the agent service can forward the quantization strategy operation response to the strategy running management service through the transmission interface based on the remote procedure call protocol.
[0028] It can be understood that when the quantification component running the quantification trading strategy depends on a local device such as a local computer, there are many inconveniences and limitations, for example, the local device must be kept online at all times during the running of the quantification trading strategy, and it is limited by the stability of the local computing resources and network environment, in addition, the technical requirements for users to manage and maintain the quantification service in the local device are also high, and the technical solution of the present application can deploy the component running the quantification trading strategy to the cloud service, and realize the running management of the quantification trading strategy through the cloud service. Since the cloud service has powerful computing power and resource elasticity, it can adjust resources according to the needs of the quantification trading strategy running, so as to ensure the efficient running of the quantification strategy and the utilization rate of resources, and reduce the running cost. Moreover, the cloud service has high availability and disaster recovery capability, can expand product functions, and ensures the continuous and stable running of the quantification service, reduces the service interruption caused by the failure of the local device. In addition, the cloud service has more perfect security protection measures, which can better protect the security of user data and strategy running, and the user does not need to care about the underlying hardware and environment configuration, and can perform a series of operations through the cloud service through the client, including starting and stopping the quantification trading strategy, which can simplify the management process and improve the user experience.
[0029] The technical solution of the present application will be described in detail below:
[0030] It should be noted that the present application does not limit the specific form of the client and the server. In addition, all the technical solutions in the present application can adopt any combination to form optional embodiments of the present application. To avoid repetition, this will not be described.
[0031] It should be noted that in the specific embodiments of the present application, related data, information, requests or instructions such as quantification trading strategy, quantification strategy operation request and quantification strategy operation response are involved. When the embodiments of the present application are applied to specific products or technologies, the permission, consent or authorization of the user needs to be obtained, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of the country and region.
[0032] In one embodiment, Figure 3 A flowchart of a quantification trading strategy processing method provided by the embodiment of the present application is shown in the figure, which can be executed by the server as Figure 1 shown, but is not limited thereto.
[0033] As shown in Figure 3 , the method can include the following steps:
[0034] S310: Start the agent service and the target quantification process in the strategy running container, wherein the target quantification process is used to run the target quantification trading strategy;
[0035] S320: receiving the quantization policy operation request sent by the quantization management client based on the agent service, and forwarding the quantization policy operation request to the target quantization process through the first data pipeline, so that the target quantization process performs corresponding operation on the target quantization trading strategy according to the quantization policy operation request;
[0036] S330: obtaining the quantization policy operation response of the target quantization process through the second data pipeline, and forwarding the quantization policy operation response to the quantization management client based on the agent service.
[0037] The above steps will be described in detail below.
[0038] In one embodiment, before performing S310, the quantization management client can first create or obtain the strategy running container through its container management service, wherein the container management service is used to connect the server (for example, cloud service) and can instruct the server to perform container creation, destruction, recycling, query and other operations. Further, the quantization management client can receive the quantization policy operation request sent by the user client through the strategy running management service, and call the container management service based on the quantization policy operation request to instruct the cloud service to perform strategy running container creation, destruction, recycling or query and other operations.
[0039] Taking the quantization policy operation request as a quantization policy start request as an example, the quantization management client receives the quantization policy start request sent by the user client through the strategy running management service, which is used to instruct to start running the quantization trading, and determines whether the server exists the strategy running container running the target quantization trading strategy based on the quantization policy start request. If not, the container management service is called based on the quantization policy start request to instruct the cloud service to perform strategy running container creation, destruction, recycling or query and other operations.
[0040] The container management service can be called by the quantization management client to shield the operation details of the server, so that the quantization management client can only focus on its own business process.
[0041] Specifically, the quantization management client can request the container management service to obtain or create the strategy running container in the server through the container management service, and then the server can start the agent service and the target quantization process in the strategy running container.
[0042] Among them, the quantitative process and the proxy service are service processes running in the container; the quantitative process can be used to run the quantitative trading strategy created by the user; the proxy service is used to provide communication proxy services and is a transit station for communication between the quantitative management client and the quantitative process; it can be understood that in the process of running the quantitative trading strategy, communication between different modules is involved. For example, when the quantitative management client needs to manage the quantitative trading strategy running in the strategy running container (for example, starting or stopping the operation of the quantitative trading strategy and querying the strategy operation status of the quantitative trading strategy), the quantitative management client needs to send data or instructions (for example, quantitative strategy operation requests) to the target quantitative process used to run the target quantitative trading strategy. If the quantitative management client directly sends instructions or data to the target quantitative process, it is similar to the server directly accessing the client. In the relevant technology, a long connection will be established between the quantitative management client and the target quantitative process, and then data or instructions will be sent through the long connection. However, the implementation and operation and maintenance costs of the long connection are relatively high. In the technical solution of the present application, a proxy service for data transfer is deployed in each strategy running container, and the proxy service provides an interface for starting or stopping the running of the quantitative trading strategy, so that the quantitative management client can control the quantitative trading strategy running in the quantitative process by calling the interface provided by the proxy service. There is no need to establish a long connection, and the two-way communication between the quantitative management client and the quantitative process is achieved efficiently and reliably in a low-cost way, allowing the quantitative management client to remotely manage the operation of the quantitative trading strategy in the strategy running container.
[0043] In one embodiment, the steps of starting a proxy service in a policy execution container specifically include: defining a transmission interface based on a remote procedure call protocol; then, obtaining a network address of the policy execution container; and then, returning the network address as a calling address of the transmission interface to the quantitative management client; the calling address is used to instruct the quantitative management client to call the transmission interface of the proxy service according to the calling address and send the quantitative policy operation request to the corresponding proxy service.
[0044] In combination with the above embodiment, the quantitative management client instructs the server to create a policy execution container by calling the container management service. After the server completes the creation of the policy execution container, it creates a proxy service and a transmission interface of the proxy service through the policy execution container, and then determines the network address of the created policy execution container as the call address of the transmission interface corresponding to the proxy service and sends it to the quantitative management client. The quantitative management client can then communicate with the quantitative process in the policy execution container by calling the proxy service based on the call interface. Specifically, the network address of the policy execution container can be the Internet Protocol (IP) address corresponding to the policy execution container.
[0045] In addition, the proxy service and the quantitative management client can both use the same remote procedure call protocol framework to implement the remote procedure call protocol service, and both can provide interfaces for external calls.
[0046] Furthermore, the quantitative management client calls the transmission interface of the proxy service according to the calling address and sends the quantitative strategy operation request to the corresponding proxy service, which may include: receiving the operation information of the quantitative strategy operation sent by the user client; serializing the operation information of the quantitative strategy operation to obtain a request byte array; determining the structure identifier of the data structure corresponding to the request byte array, the structure identifier is used to instruct the target quantitative process to parse the request byte array; combining the request byte array and the structure identifier to obtain the quantitative strategy operation request.
[0047] The operation information of the quantitative strategy operation may specifically be operation information for operations such as starting the operation of the quantitative trading strategy, stopping the operation of the quantitative trading strategy, or querying the strategy operation status of the quantitative trading strategy; specifically, the operation information may include but is not limited to: the operation type of the quantitative strategy operation, the strategy identifier of the quantitative trading strategy affected by the quantitative strategy operation, etc.
[0048] The structure identifier of the data structure is used to indicate the data structure type of the requested byte array. The structure identifier of the data structure can be used to determine the data structure parsing method to obtain the operation information of the corresponding quantitative strategy operation from the requested byte array.
[0049] For example, Figure 4 As shown, the quantitative management client can serialize the data to be transmitted, namely, the operation information of the quantitative strategy operation, to obtain a request byte array "req_data". The data structure corresponding to the request byte array can be SendDataReq (Send Data Request), which can determine that the structure identifier "data_id" of the data structure is 1, where "data_id = 1" indicates that the target quantitative process uses the data structure parsing method of sending data request to parse the request byte array. After obtaining the request byte array and its corresponding structure identifier, the quantitative strategy operation request can be obtained based on the request byte array and its corresponding structure identifier. In addition, the quantitative management client can also determine the policy identifier of the quantitative trading strategy being operated from the operation information of the quantitative strategy operation. The policy identifier is the unique identifier of the running quantitative trading strategy. Then, based on the policy identifier, the quantitative management client can query the database (DB) for the policy execution container corresponding to the quantitative trading strategy to be operated and obtain its network address (i.e., the call address of the transmission interface of the proxy service within the policy execution container). Then, the transmission interface provided by the proxy service of the policy execution container can be called through this network address to send the quantitative strategy operation request to the corresponding proxy service.
[0050] In one embodiment, the proxy service and the quantitative process run in the same strategy execution container, and pipelines can be used for inter-process communication. Since the data transmission of the pipeline is one-way, one pipeline is used for the proxy service to transmit data to the vectorized process, and one pipeline is used for the quantitative process to transmit data to the proxy service. Therefore, in order to send data and receive replies, two pipelines need to be created. After the proxy service receives the quantitative strategy operation request sent by the quantitative management client, it can forward the quantitative strategy operation request to the target quantitative process through the first data pipeline. The target quantitative process performs corresponding operations on the target quantitative trading strategy according to the quantitative strategy operation request and obtains the corresponding quantitative strategy operation response, and returns the quantitative strategy operation response to the proxy service through the second data pipeline. Finally, the quantitative strategy operation response is forwarded to the quantitative management client through the proxy service.
[0051] For example, Figure 5 As shown, the proxy service can communicate with the target quantitative process through a named pipe to forward the quantitative strategy operation request to the target quantitative process or obtain the quantitative strategy operation response replied by the target quantitative process. Specifically, the proxy service can write the quantitative strategy operation request to the agent_write_channel (write pipe), and the target quantitative process can listen to and read the quantitative strategy operation request from the write pipe; then, the target quantitative process can perform corresponding operations on the quantitative trading strategy based on the read quantitative strategy operation request, for example, starting or stopping the operation of the quantitative trading strategy, querying the strategy operation status of the quantitative trading strategy, and determining the corresponding operation to obtain the quantitative strategy operation response; finally, the target quantitative process can write the quantitative strategy operation response to the agent_read_channel (read pipe), and the proxy service can listen to and read the quantitative strategy operation response from the read pipe.
[0052] Among them, the above two pipelines (i.e., the first data pipeline and the second data pipeline) can be pre-set in the Docker (application container engine) image that creates the policy running container, so that the pipelines can be directly used for communication after the policy running container is created.
[0053] It is understandable that the pipeline transmits unordered byte stream data. The data read directly from the pipeline is a string of garbled bytes, which needs to be parsed to determine the specific content. Therefore, when using pipeline transmission, it is necessary to define the format of the data to be transmitted so that the data can be parsed after reading. This is introduced below.
[0054] The data transmitted in the pipeline, for example, the request pipeline data or the reply pipeline data, can include two parts of a header and a body. The body corresponds to the actual data to be transmitted, and can be located after the header. For example, the body can include a request byte array or a reply byte array (which will be described in subsequent embodiments). The header can correspond to the preamble bytes in the data transmitted in the pipeline, and can include various fields for checking or parsing data, as follows:
[0055] HeaderFlag refers to a fixed prefix of the header, that is, a header identifier, used to identify the start of a piece of data. If the first or the first few bytes are not the header identifier when a piece of data is parsed, it indicates that the data parsing is incorrect or the data reading and writing is incorrect.
[0056] DataID refers to the structure identifier of the data structure of the actual data to be transmitted, used to record the structure of the data, so that the quantization process or the agent service can parse the body according to the corresponding data structure. The DataID of the data sent in the pipeline and the reply data is the same. The DataID records a group of data structures, that is, the data structure corresponding to the request byte array in the request pipeline data and the data structure corresponding to the reply byte array in the reply pipeline data.
[0057] SerialNo refers to a request serial number. In the data transmission in the pipeline, sending and replying are one-to-one corresponding. In the same interaction process, the data sent and replied between the agent service and the quantization process have the same request serial number, and the two messages can be associated through the request serial number. The agent service locally maintains a request serial number starting from 1. Each time data needs to be sent, the value of the request serial number is incremented by 1 and used in the header.
[0058] BodyLen refers to the length of the body, specifically the length value of the actual data to be transmitted in the pipeline, for example, the request data length value of the request byte array or the reply data length value of the reply byte array. According to the length of the body, the byte code read from the pipeline can be split or assembled into a complete piece of data. For example, if the BodyLen of a certain piece of data read from the pipeline is 100, it can be determined that the total length of the data is 122 bytes (22 bytes of header + 100 bytes of body). Therefore, 100 bytes can be directly cut off to obtain the body of the current piece of data.
[0059] Reserved refers to a reserved field. It can be used as a newly added field in the future to avoid modifying the length of the header when adding a new field.
[0060] The above process, that is, S320-330, will be described in detail below.
[0061] In one embodiment, S320 may include: constructing request pipeline data according to the quantization policy operation request; writing the request pipeline data to the first data pipeline through the proxy service running in the policy running container; monitoring the first data pipeline through the target quantization process and reading the request pipeline data.
[0062] Correspondingly, after reading the request pipeline data, the target quantitative process can perform corresponding operations on the target quantitative trading strategy according to the request pipeline data, for example, starting the operation of the quantitative trading strategy, stopping the operation of the quantitative trading strategy, or querying the strategy operation status of the quantitative trading strategy.
[0063] Specifically, the above-mentioned construction of request pipeline data based on the quantization strategy operation request includes: determining the packet header identifier, the request serial number of the request pipeline data, and the request data length value of the request byte array in the quantization strategy operation request; combining the packet header identifier, the request serial number, the request data length value, and the structure identifier in the quantization strategy operation request to obtain the request packet header data; determining the request package body data based on the request byte array in the quantization strategy operation request (specifically, the request byte array can be directly determined as the request package body data); combining the request packet header data and the request package body data to obtain the request pipeline data.
[0064] Among them, the request packet header data and the request packet body data can be combined according to the content in the above embodiment to obtain the request pipeline data. To avoid repetition, this is not described in detail.
[0065] For example, in combination with the above embodiments, Figure 6 As shown, after the proxy service receives the Req data sent by the quantitative management client, it can assemble the result representation in the quantitative strategy operation request, the header identifier, the request sequence number of the request pipeline data, and the request data length value to obtain the header data, and then splice the header data with the request byte array (i.e., the req_data field) in the quantitative strategy operation request to obtain the complete pipeline data, i.e., the request pipeline data. The proxy service can then send the request pipeline data to the agent_write_channel, i.e., the first data pipeline. If the sending fails, an exception is returned; if it succeeds, the target quantitative process can read the request pipeline data by monitoring the first data pipeline, and operate the quantitative trading strategy according to the request pipeline data to determine the reply pipeline data corresponding to the request pipeline data; at the same time, the proxy service can wait to receive the return packet from the target quantitative process, i.e., the reply pipeline data.
[0066] In an embodiment, after the target quantization process obtains the request pipeline data in the agent_write_channel, i.e., the first data pipeline, the target quantization process can first intercept the request header data in the request pipeline data. Specifically, the request header data can be intercepted according to the header length (i.e., the number of bytes occupied) of the request header data, for example, 22 bytes. Then, the target quantization process can determine whether the header identifier in the request header data is a preset header identifier, for example, FT. If not, it is determined that an exception occurs and an exception error code is determined, and the exception error code is sent to the quantization management client (which will be introduced in subsequent embodiments). If yes, the request sequence number, the request data length value of the request byte array, and the structure identifier in the quantization strategy operation request in the request header data are parsed one by one. Then, it can be determined whether the request sequence number is greater than the value of the last request sequence number by 1. If not, it is determined that an exception occurs and an exception error code is determined, and the exception error code is sent to the quantization management client (which will be introduced in subsequent embodiments). If yes, the request header data is first intercepted according to the request data length value to obtain request body data, and then the request body data is parsed according to the structure identifier to obtain the request content corresponding to the quantization strategy operation request. Then, the target quantization process can perform a corresponding operation on the quantization trading strategy according to the request content, for example, starting the running of the quantization trading strategy, stopping the running of the quantization trading strategy, or querying the strategy running state of the quantization trading strategy; and determining a quantization strategy operation response according to the operation result.
[0067] For example, the quantization strategy operation response includes two parts: a reply byte array obtained by serializing the reply content corresponding to the quantization strategy operation response, and a structure identifier of the data structure corresponding to the reply byte array, which is used to parse the reply byte array. The structure identifier of the data structure corresponding to the reply byte array can be consistent with the structure identifier of the data structure corresponding to the request byte array. Subsequently, the target quantization process can determine the construction reply pipeline data for transmission in the second data pipeline according to the fact that the quantization strategy operation response includes two parts.
[0068] The reply byte array can be represented by the rsp_data field, and the corresponding data structure can be SendDataRsp (send data reply). At the same time, the structure identifier "data_id" of the data structure can be determined to be 1, wherein "data_id = 1" is used to indicate that the reply byte array is parsed using CheckRunningStatusRsp. Specifically, if the quantitative strategy operation request is used to query the strategy running status of the quantitative trading strategy, the reply byte array may include: a strategy running status field "running_status" for indicating the strategy running status; if the strategy running status is stopped, the reply byte array may also include: a strategy stop reason field "stop_reason" indicating the reason why the quantitative trading strategy stopped running.
[0069] In one embodiment, S330 may include: constructing reply pipeline data according to the quantization strategy operation response; writing the reply pipeline data in the second data pipeline through the target quantization process; monitoring the second data pipeline through the proxy service and reading the reply pipeline data to obtain the quantization strategy operation response.
[0070] Specifically, the above-mentioned determination of the operation response data based on the quantitative strategy operation response includes: serializing the reply content corresponding to the quantitative strategy operation response to obtain a reply byte array; determining the structure identifier of the data structure corresponding to the reply byte array, the structure identifier is used to parse the reply byte array; determining the reply data length value of the reply byte array; determining the packet header identifier and reply sequence number corresponding to the request pipeline data; combining the packet header identifier, reply sequence number, structure identifier and reply length value to obtain reply packet header data; determining the reply body data based on the reply byte array (specifically, the reply byte array can be directly determined as the reply body data); combining the reply header data and the reply body data to obtain reply pipeline data.
[0071] The reply sequence number is consistent with the request sequence number. The method of combining the reply header data and the reply body data can refer to the above embodiment, and this application will not elaborate on this.
[0072] In one embodiment, the above-mentioned agent-based service forwards the quantization policy operation response to the quantization management client, including: obtaining the packet header identifier in the reply pipeline data; in response to the packet header identifier in the reply pipeline data being a preset packet header identifier, parsing the reply pipeline data to obtain the reply sequence number, the structure identifier and the reply length value in the reply pipeline data; in response to the reply sequence number being consistent with the request sequence number in the request pipeline data, obtaining the reply byte array from the reply pipeline data according to the reply length value; combining the reply byte array and the structure identifier to determine the quantization policy operation response; and forwarding the quantization policy operation response to the quantization management client through the agent service call based on the transmission interface of the remote procedure call protocol.
[0073] In the combination of the reply byte array and the structure identifier to determine the quantization policy operation response, an identifier indicating whether the request is successful can also be generated, and the identifier, the reply byte array and the structure identifier are combined to determine the quantization policy operation response. For example, the identifier indicating whether the request is successful can be determined as ret_code, ret_code = 1 indicating that the quantization policy operation request is successful; and ret_code = 0 indicating that the quantization policy operation request fails.
[0074] As can be seen from the above embodiments, the quantization policy operation request and the quantization policy operation response are one-to-one correspondence, therefore, the reply sequence number and the request sequence number should be consistent, and by determining that the reply sequence number and the request sequence number are consistent, the accuracy of the entire communication process can be ensured.
[0075] For example, in combination with the above content, as Figure 7As shown, the agent service can first receive byte data, i.e., reply pipe data, from the agent_read_channel, i.e., the second data pipe. Then, the first 22 bytes of the reply pipe data can be intercepted to obtain reply header data. Next, it can be determined whether the first 2 bytes of the reply header data, i.e., the header identifier, is the preset header identifier FT. If not, it is determined that an exception has occurred and an exception error code is determined, which is sent to the quantization management client (which will be described in subsequent embodiments). For example, an identifier ret_code=0 indicating whether the request is successful can be determined, and a quantization policy operation response is determined accordingly. If yes, the reply sequence number, the structure identifier, and the reply length value in the reply header data are parsed one by one. Then, it can be determined whether the reply sequence number is consistent with the request sequence number in the request pipe data. If not, it is determined that an exception has occurred and an exception error code is determined, which is sent to the quantization management client (which will be described in subsequent embodiments). For example, an identifier ret_code=0 indicating whether the request is successful can be determined, and a quantization policy operation response is determined accordingly. If yes, the reply length value bytes from the back to the front in the reply pipe data are intercepted to obtain reply body data. Next, the reply byte array and the structure identifier in the reply body data are combined to determine a quantization policy operation response, an identifier ret_code=1 indicating whether the request is successful is set, and it is returned to the policy management client.
[0076] The following describes the exception conditions involved in the above communication process.
[0077] In one embodiment, for communication between the agent service and the target quantization process, the server can first determine first exception data; determine an exception error code according to the exception type of the first exception data; and send the exception error code to the quantization management client.
[0078] The determination of the first exception data includes any of the following: in response to an exception in reading or writing data in the data pipe, the first exception data is determined; in response to no reading data or writing data in the data pipe within a preset time length, the first exception data is determined; in response to the data read from the data pipe not conforming to a preset format, the first exception data is determined; and in response to the obtained reply sequence number being greater than the corresponding request sequence number, the first exception data is determined.
[0079] Specifically, if there is no exception, the exception error code can be set as RESULT_CODE_SUCCESS=0; if the exception type is a pipe read / write exception (i.e., an exception in reading or writing data in the data pipe), the exception error code can be RESULT_CODE_IO_ERR=1; if the exception type is a pipe read / write timeout (i.e., no reading or writing data in the data pipe within a preset time period), the exception error code can be RESULT_CODE_RSP_READ_TIMEOUT=2; if the exception type is an abnormal quantization process response packet structure (i.e., the data read from the data pipe does not conform to the preset format), the exception error code can be RESULT_CODE_RSP_STRUCT_ERR=3; if the exception type is an abnormal quantization process response packet serial number (i.e., the obtained response serial number is greater than the corresponding request serial number), the exception error code can be RESULT_CODE_RSP_SERIAL_NUMBER_ERR=4.
[0080] It can be understood that if the system, container or code logic is abnormal, or the proxy service or quantization process cannot find the data pipe, the data pipe can have an input / output (IO) exception, i.e., a pipe read / write exception, and thus the exception can be directly returned to the upper quantization management client.
[0081] Since the reading and writing of the data pipe are blocking, if a process writes data to the data pipe without other processes reading or without processes writing data to the data pipe, the corresponding reading or writing process in the data pipe will be blocked, and thus a 3-second timeout, i.e., the above-mentioned preset time period, can be set. If the reading and writing of data in the data pipe is timed out, the current reading and writing can be abandoned, the data can be discarded, and the quantization management client can be fed back with this exception.
[0082] The data transmitted in the data pipe all have a fixed format, for example, the request pipe data and the response pipe data both conform to a preset format, e.g., the first two bytes of the packet header data are a preset packet header identifier "FT". If the data read from the data pipe does not conform to the preset format, it will cause an abnormal data analysis, and thus the error can be detected and returned to the quantization management client.
[0083] Each communication between the proxy service and the quantization process is composed of one data sending (quantization policy operation request) and one data reply (quantization policy operation response), and the data sent and replied in the packet header has the same serial number SerialNo, i.e., the request serial number is the same as the reply serial number, and the sending and reply can be associated through the same serial number. Since the request serial number is monotonically increasing, theoretically, each sent message and each replied message has a monotonically increasing serial number, and if the two serial numbers are inconsistent, it can be determined that the reply serial number is abnormal. The inconsistency between the request serial number and the reply serial number specifically includes the following two cases:
[0084] (1) The reply serial number is smaller than the request serial number. This situation may be due to the fact that the last reply was not correctly processed due to timeout or other reasons, and the last request end was received by the new request process, so this reply can be discarded, and the subsequent reply with a larger serial number can be read until the request serial number and the reply serial number are consistent.
[0085] (2) The reply serial number is larger than the request serial number. Since the request serial number comes first, the reply serial number should not theoretically appear in this situation, so the quantization management client can be fed back an abnormality.
[0086] In the above content, the first abnormal data is difficult for the server to solve, so it can be sent to the quantization management client in the form of an abnormal error code for processing.
[0087] In an embodiment, the following situations may occur for the process of the quantization management client requesting the proxy service (sending a quantization policy operation request to the proxy service):
[0088] Case one, the transmission interface based on the remote procedure call protocol returns normally, and the identification ret_code of whether the request is successful is 0 (indicating that the request is successful). This is a normal situation, indicating that the data sending is successful and the reply is correctly obtained.
[0089] Case two, the transmission interface based on the remote procedure call protocol returns an RPC error.
[0090] This situation indicates that the quantization management client has an exception when requesting the transmission interface of the proxy service, such as interface timeout or the proxy service being offline (for example, not started), resulting in interface call failure.
[0091] Generally, this situation is caused by network jitter, which causes the interface to time out. At this time, the quantitative management client can re-execute a maximum of a preset number of times, for example, 3 times of retry, which can generally solve the problem. If 3 times of retry still results in situation two, there is a high probability that the proxy service has failed, such as the proxy service is no longer running, or even the corresponding container has been down. At this time, an alarm can be triggered for manual intervention to troubleshoot.
[0092] Situation three, the transmission interface based on the remote procedure call protocol returns normally, but the identification ret_code of whether the request is successful is not 0.
[0093] This situation indicates that the quantitative management client successfully sends the quantitative strategy operation request to the proxy service, but the proxy service has an exception when processing, such as the above-mentioned first exception data.
[0094] If the pipe read-write exception occurs, it may be that the environment of the container has a problem, such as the pipe is not correctly packaged when the container image is packaged. At this time, an alarm can be triggered for manual intervention to troubleshoot.
[0095] If the pipe read-write timeout occurs, it may be that the current CPU load of the container is high, causing the quantitative process to process slowly and reply not in time. At this time, the quantitative management client can re-execute a maximum of a preset number of times. If the failure still occurs, an alarm can be triggered for manual intervention to troubleshoot.
[0096] If the packet structure exception or the packet sequence exception occurs, it is basically unrecoverable, and an alarm can be triggered for manual intervention to troubleshoot. In addition, the quantitative process in the container can no longer be managed at this time, and therefore, the container can be recycled and the running of the quantitative trading strategy can be stopped.
[0097] Through the technical scheme of the present application, a proxy service for data relay can be deployed in each strategy running container, so that efficient and reliable bidirectional communication between the quantitative management client and the quantitative process can be realized at a low cost, and the quantitative management client can remotely run the quantitative trading strategy in the strategy running container, thereby improving the convenience of running and operating the quantitative trading strategy.
[0098] Figure 8 A schematic diagram of a quantitative trading strategy processing device 800 provided by an embodiment of the present application.
[0099] As shown in Figure 8 the quantitative trading strategy processing device 800 includes a first starting module 801, a first forwarding module 802, a second forwarding module 803, a data determining module 804, an error determining module 805, and an error sending module 806, wherein:
[0100] In one embodiment, the first starting module 801 is configured to start an agent service and a target quantification process in a strategy running container, where the target quantification process is configured to run a target quantification trading strategy; the first forwarding module 802 is configured to receive a quantification strategy operation request sent by a quantification management client based on the agent service, and forward the quantification strategy operation request to the target quantification process through a first data pipeline, so that the target quantification process performs a corresponding operation on the target quantification trading strategy according to the quantification strategy operation request; and the second forwarding module 803 is configured to acquire a quantification strategy operation response of the target quantification process through a second data pipeline, and forward the quantification strategy operation response to the quantification management client based on the agent service.
[0101] Specifically, the first starting module 801 is configured to define a transmission interface of the agent service based on a remote procedure call protocol, acquire a network address of the strategy running container, and return the network address to the quantification management client as a call address of the transmission interface; the call address is configured to instruct the quantification management client to send the quantification strategy operation request to the corresponding agent service through the transmission interface of the agent service according to the call address.
[0102] Specifically, the first forwarding module 802 is configured to construct request pipeline data according to the quantification strategy operation request, write the request pipeline data into the first data pipeline through the agent service running in the strategy running container, and listen to the first data pipeline through the target quantification process to read the request pipeline data; accordingly, the target quantification process performs a corresponding operation on the target quantification trading strategy according to the request pipeline data.
[0103] Specifically, the first forwarding module 802 is configured to determine a packet header identifier, a request sequence number of the request pipeline data, and a request data length value of a request byte array in the quantification strategy operation request, combine the packet header identifier, the request sequence number, the request data length value, and a structure identifier in the quantification strategy operation request to obtain request packet header data, determine request packet body data according to the request byte array in the quantification strategy operation request, and combine the request packet header data and the request packet body data to obtain the request pipeline data.
[0104] Specifically, the second forwarding module 803 is configured to construct reply pipeline data according to the quantification strategy operation response, write the reply pipeline data into the second data pipeline through the target quantification process, and listen to the second data pipeline through the agent service to read the reply pipeline data to acquire the quantification strategy operation response.
[0105] Specifically, the second forwarding module 803 is configured to serialize the reply content corresponding to the quantization policy operation response to obtain a reply byte array, determine a structure identifier of a data structure corresponding to the reply byte array, the structure identifier being used for analyzing the reply byte array, determine a reply data length value of the reply byte array, determine a packet header identifier and a reply sequence number corresponding to the request pipe data, combine the packet header identifier, the reply sequence number, the structure identifier, and the reply length value to obtain reply packet header data, determine reply packet body data according to the reply byte array, and combine the reply packet header data and the reply packet body data to obtain the reply pipe data.
[0106] Specifically, the second forwarding module 803 is configured to obtain the packet header identifier in the reply pipe data, analyze the reply pipe data to obtain the reply sequence number, the structure identifier, and the reply length value in the reply pipe data in response to the packet header identifier in the reply pipe data being a preset packet header identifier, obtain the reply byte array from the reply pipe data according to the reply length value in response to the reply sequence number being consistent with the request sequence number in the request pipe data, combine the reply byte array and the structure identifier to determine the quantization policy operation response, and forward the quantization policy operation response to the quantization management client through the proxy service and by calling a transmission interface based on a remote procedure call protocol.
[0107] Specifically, the data determination module 804 is configured to determine the first abnormal data, the error determination module 805 is configured to determine an abnormal error code according to the abnormal type of the first abnormal data, and the error sending module 806 is configured to send the abnormal error code to the quantization management client. The determination of the first abnormal data includes any of the following: determining the first abnormal data in response to an abnormality in reading or writing data in the data pipe, determining the first abnormal data in response to no reading data or writing data in the data pipe within a preset time length, determining the first abnormal data in response to the data read from the data pipe not conforming to a preset format, and determining the first abnormal data in response to the obtained reply sequence number being greater than the corresponding request sequence number.
[0108] It should be understood that the apparatus embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, details are not described herein. Specifically, Figure 8 The apparatus 800 shown can perform the method embodiments described above, and the foregoing and other operations and / or functions of the various modules in the apparatus 800 are respectively used to implement the corresponding processes in the various methods described above. To be brief, details are not described herein.
[0109] The apparatus 800 of the embodiments of the present application is described above from the perspective of functional modules in combination with the drawings. It should be understood that the functional modules can be implemented in the form of hardware, or in the form of instructions of software, or in the form of a combination of hardware and software modules. Specifically, each step of the method embodiments in the embodiments of the present application can be completed by integrated logic circuits of hardware in a processor and / or instructions of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware code processing for execution by a processor, or be executed by a combination of hardware and software modules in the processor. Alternatively, the software module can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, and the like. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the above method embodiments in combination with hardware thereof.
[0110] Figure 9 A schematic block diagram of an electronic device 900 according to an embodiment of the present application is provided.
[0111] As shown in Figure 9 , the electronic device 900 can include:
[0112] The memory 910 is configured to store a computer program and transmit the program code to the processor 920. In other words, the processor 920 can call and run the computer program from the memory 910 to implement the method in the embodiments of the present application.
[0113] For example, the processor 920 can be configured to execute the above method embodiments according to the instructions in the computer program.
[0114] In some embodiments of the present application, the processor 920 can include but is not limited to:
[0115] A general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and the like.
[0116] In some embodiments of the present application, the memory 910 includes but is not limited to:
[0117] The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synch Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0118] In some embodiments of the present application, the computer program can be divided into one or more modules, which are stored in the memory 910 and executed by the processor 920 to complete the method provided by the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device.
[0119] As shown in Figure 9 The electronic device can further include:
[0120] The transceiver 930 can be connected to the processor 920 or the memory 910.
[0121] The processor 920 can control the transceiver 930 to communicate with other devices, specifically, can send information or data to other devices, or receive information or data sent by other devices. The transceiver 930 can include a transmitter and a receiver. The transceiver 930 can further include an antenna, and the number of antennas can be one or more.
[0122] It should be understood that the various components within the electronic device are connected via a bus system, which includes, in addition to a data bus, a power supply bus, a control bus, and a state signal bus.
[0123] The application also provides a computer storage medium, which stores a computer program, and the computer program enables a computer to execute the method of the method embodiment when executed by the computer. Alternatively, the application embodiment also provides a computer program product containing instructions, and the instructions enable the computer to execute the method of the method embodiment when executed by the computer.
[0124] When implemented by using software, the software can be implemented in the form of a computer program product entirely or partially. The computer program product includes one or more computer instructions. When loaded and executed by a computer, the computer program instructions can enable the computer to execute the corresponding flow in each method in the application embodiment entirely or partially, and produce the function that can be implemented by each method in the application embodiment. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, digital video disc (DVD)), or a semiconductor medium (for example, solid state disk (SSD)), etc.
[0125] Those skilled in the art can realize that the modules and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0126] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the division of the above-described device embodiment is merely an example, and there can be other division manners. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the modules shown or discussed can be indirect coupling or communication connection through some interface, device or module, and can be electrical, mechanical or in other forms.
[0127] The modules described as separated components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments. For example, the functional modules in the embodiments of the present application can be integrated into a processing module, or each module can be physically present separately, or two or more modules can be integrated into one module.
[0128] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A quantitative trading strategy processing method, characterized in that: include: Starting an agent service and a target quantitative process in the strategy execution container, wherein the target quantitative process is used to run the target quantitative trading strategy; receiving, based on the proxy service, a quantitative strategy operation request sent by a quantitative management client, and forwarding the quantitative strategy operation request to the target quantitative process through a first data pipeline, so that the target quantitative process performs corresponding operations on the target quantitative trading strategy according to the quantitative strategy operation request; The quantization policy operation response of the target quantization process is obtained through the second data pipeline, and the quantization policy operation response is forwarded to the quantization management client based on the proxy service.
2. The method according to claim 1, characterized in that Starting the proxy service in the policy running container includes: Defining a transmission interface of the proxy service based on a remote procedure call protocol; Obtain the network address of the policy execution container and return the network address as the calling address of the transmission interface to the quantitative management client; the calling address is used to instruct the quantitative management client to call the transmission interface of the proxy service according to the calling address to send the quantitative policy operation request to the corresponding proxy service.
3. The method according to claim 1, characterized in that The forwarding the quantization strategy operation request to the target quantization process through the first data pipeline includes: Constructing request pipeline data according to the quantitative strategy operation request; Writing the request pipeline data into the first data pipeline through a proxy service running in the policy execution container; Monitor the first data pipeline through the target quantization process and read the request pipeline data; Correspondingly, the target quantitative process performs corresponding operations on the target quantitative trading strategy according to the request pipeline data.
4. The method according to claim 3, characterized in that The step of constructing request pipeline data according to the quantization strategy operation request includes: Determine a packet header identifier, a request sequence number of the request pipeline data, and a request data length value of the request byte array in the quantization strategy operation request; Combining the packet header identifier, the request sequence number, the request data length value, and the structure identifier in the quantization strategy operation request to obtain request packet header data; Determining request body data according to the request byte array in the quantization strategy operation request; The request packet header data and the request packet body data are combined to obtain the request pipeline data.
5. The method according to claim 1, wherein The obtaining, through the second data pipeline, a quantization strategy operation response of the target quantization process includes: Constructing reply pipeline data according to the quantitative strategy operation response; Writing the reply pipeline data into the second data pipeline through the target quantization process; The second data pipeline is monitored through the proxy service, and the reply pipeline data is read to obtain the quantitative strategy operation response.
6. The method according to claim 5, characterized in that The step of constructing reply pipeline data according to the quantitative strategy operation response includes: Serializing the reply content corresponding to the quantization strategy operation response to obtain a reply byte array; Determine a structure identifier of a data structure corresponding to the reply byte array, wherein the structure identifier is used to parse the reply byte array; Determine the reply data length value of the reply byte array; Determine a packet header identifier and a reply sequence number corresponding to the request pipeline data; Combining the packet header identifier, the reply sequence number, the structure identifier, and the reply length value to obtain reply packet header data; Determine the reply packet body data according to the reply byte array; The reply packet header data and the reply packet body data are combined to obtain the reply pipe data.
7. The method according to claim 6, characterized in that The forwarding the quantitative strategy operation response to the quantitative management client based on the proxy service includes: Obtaining a packet header identifier in the reply pipe data; In response to the packet header identifier in the reply pipe data being a preset packet header identifier, parsing the reply pipe data to obtain a reply sequence number, a structure identifier, and a reply length value in the reply pipe data; In response to the reply sequence number being consistent with the request sequence number in the request pipe data, obtaining the reply byte array from the reply pipe data according to the reply length value; Combining the reply byte array and the structure identifier to determine the quantization strategy operation response; The proxy service calls a transmission interface based on the remote procedure call protocol to forward the quantitative strategy operation response to the quantitative management client.
8. The method according to any one of claims 1 to 7, characterized in that Also includes: determining first abnormal data; determining an abnormal error code according to the abnormal type of the first abnormal data; Sending the abnormal error code to the quantitative management client; The determining of the first abnormal data includes any one of the following: In response to an abnormality in reading or writing data in a data pipeline, determining the first abnormal data; In response to no read data or no write data occurring in the data pipeline within a preset time period, determining the first abnormal data; In response to the data read from the data pipeline not conforming to a preset format, determining the first abnormal data; In response to the acquired reply sequence number being greater than the corresponding request sequence number, the first abnormal data is determined.
9. A quantitative trading strategy processing device, characterized in that: include: A first startup module is used to start the proxy service and the target quantitative process in the strategy execution container, wherein the target quantitative process is used to run the target quantitative trading strategy; a first forwarding module, configured to receive, based on the proxy service, a quantitative strategy operation request sent by a quantitative management client, and forward the quantitative strategy operation request to the target quantitative process through a first data pipeline, so that the target quantitative process performs corresponding operations on the target quantitative trading strategy according to the quantitative strategy operation request; The second forwarding module is configured to obtain the quantization policy operation response of the target quantization process through a second data pipeline, and forward the quantization policy operation response to the quantization management client based on the proxy service.
10. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 8 by executing the executable instructions.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.