CN115168056A - Information processing method, device, equipment and medium based on resource allocation - Google Patents
Information processing method, device, equipment and medium based on resource allocation Download PDFInfo
- Publication number
- CN115168056A CN115168056A CN202211069820.7A CN202211069820A CN115168056A CN 115168056 A CN115168056 A CN 115168056A CN 202211069820 A CN202211069820 A CN 202211069820A CN 115168056 A CN115168056 A CN 115168056A
- Authority
- CN
- China
- Prior art keywords
- thread
- processing
- delivery
- information
- data
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/128—Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5011—Pool
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5018—Thread allocation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Databases & Information Systems (AREA)
- Finance (AREA)
- Data Mining & Analysis (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses an information processing method, device, equipment and medium based on resource allocation, wherein the method comprises the following steps: the method comprises the steps of distributing system resources of a management server according to configuration information to determine a delivery thread corresponding to each processing thread, obtaining delivery docking parameters fed back by a client through the delivery threads, inputting received transaction data into the processing threads respectively for processing so as to update initial data in the processing threads, obtaining snapshot information corresponding to the delivery docking parameters from the updated initial data according to the delivery docking parameters of the delivery threads, and delivering the snapshot information to the client docked with the delivery threads through the delivery threads. The invention belongs to the technical field of big data processing, and the method stores the received transaction data through a processing thread, and acquires snapshot information corresponding to a submission docking parameter through a submission thread, so that the corresponding snapshot information is acquired according to the requirements of a client for feedback, and the transaction data information is viewed more comprehensively.
Description
Technical Field
The present invention relates to the field of big data processing technologies, and in particular, to an information processing method, apparatus, device, and medium based on resource allocation.
Background
In the process of carrying out related trading in the stock market, a client submits corresponding trading data to an exchange, and the exchange carries out corresponding processing according to the trading data and feeds back a trading snapshot data value client. Therefore, the prior art method has the problem that the transaction data information cannot be comprehensively viewed.
Disclosure of Invention
The embodiment of the invention provides an information processing method, device, equipment and medium based on resource allocation, and aims to solve the problem that transaction data information cannot be comprehensively checked in the prior art.
In a first aspect, an embodiment of the present invention provides an information processing method based on resource configuration, where the method includes:
distributing the system resources of the management server according to preset configuration rules to determine a delivery thread corresponding to each processing thread in the system resources;
sending delivery docking information to a client through a delivery thread corresponding to each processing thread so as to obtain delivery docking parameters fed back by the client;
if transaction data from the transaction server is received, inputting the transaction data into any one of the processing threads for processing, so as to update the cached initial data according to a processing result;
acquiring snapshot information corresponding to the submission docking parameters from the updated initial data according to the submission docking parameters corresponding to the submission threads;
and submitting the snapshot information to the client side which is in butt joint with each submitting thread through the corresponding submitting thread.
In a second aspect, an embodiment of the present invention provides an information processing apparatus based on resource configuration, including:
the resource allocation unit is used for allocating the system resources of the management server according to a preset configuration rule so as to determine a delivery thread corresponding to each processing thread in the system resources;
a delivery and docking parameter obtaining unit, configured to send delivery and docking information to a client through a delivery thread corresponding to each processing thread, so as to obtain a delivery and docking parameter fed back by the client;
the initial data updating unit is used for inputting the transaction data into any one of the processing threads for processing if the transaction data from the transaction server is received, so as to update the cached initial data according to a processing result;
a snapshot information obtaining unit, configured to obtain, according to a delivery docking parameter corresponding to each delivery thread, snapshot information corresponding to the delivery docking parameter from the updated initial data;
and the snapshot information submitting unit is used for submitting the snapshot information to the client which is in butt joint with each submitting thread through the corresponding submitting thread.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the information processing method based on resource configuration according to the first aspect.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the information processing method based on resource configuration according to the first aspect.
The embodiment of the invention provides an information processing method, device, equipment and medium based on resource allocation. The method comprises the steps of distributing system resources of a management server according to configuration information to determine a delivery thread corresponding to each processing thread, obtaining delivery docking parameters fed back by a client through the delivery threads, inputting received transaction data into the processing threads respectively for processing so as to update initial data in the processing threads, obtaining snapshot information corresponding to the delivery docking parameters from the updated initial data according to the delivery docking parameters of the delivery threads, and delivering the snapshot information to the client docked with the delivery threads through the delivery threads. By the method, the received transaction data can be stored through the processing thread, the snapshot information corresponding to the submitting and docking parameters is obtained through the submitting thread, and therefore the corresponding snapshot information is obtained according to the requirements of the clients for feedback, and the transaction data information can be viewed more comprehensively.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an information processing method based on resource allocation according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of an information processing method based on resource allocation according to an embodiment of the present invention;
FIG. 3 is a sub-flowchart of an information processing method based on resource allocation according to an embodiment of the present invention;
FIG. 4 is a schematic view of another sub-flow of an information processing method based on resource allocation according to an embodiment of the present invention;
fig. 5 is another schematic flowchart of an information processing method based on resource allocation according to an embodiment of the present invention;
FIG. 6 is a schematic view of another sub-flow of an information processing method based on resource allocation according to an embodiment of the present invention;
FIG. 7 is a schematic flowchart of an information processing method based on resource allocation according to an embodiment of the present invention;
FIG. 8 is a schematic view of another sub-flow of an information processing method based on resource allocation according to an embodiment of the present invention;
FIG. 9 is a schematic block diagram of an information processing apparatus based on resource allocation according to an embodiment of the present invention;
FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic flowchart of an information processing method based on resource allocation according to an embodiment of the present invention, and fig. 2 is a schematic application scenario diagram of the information processing method based on resource allocation according to the embodiment of the present invention; the information processing method based on resource allocation is applied to a management server 10, the management server 10 establishes network connection with a transaction server 30 and at least one client 20 to transmit data information, and the information processing method based on resource allocation is executed through application software installed in the management server 10; the management server 10 is a server side for executing an information processing method based on resource allocation to receive the transaction data from the transaction server 30 and feedback snapshot information to the client 20 after processing, such as a server side built inside an enterprise or a government department; the client 20 is a terminal device for receiving and displaying snapshot information, such as a notebook computer, a desktop computer, a tablet computer, or a mobile phone, and the transaction server 30 is a server for performing transaction data interaction processing, which is constructed by a transaction bureau. As shown in FIG. 1, the method includes steps S110 to S150.
S110, distributing the system resources of the management server according to preset configuration rules to determine a delivery thread corresponding to each processing thread in the system resources.
And distributing the system resources of the management server according to a preset configuration rule so as to determine a delivery thread corresponding to each processing thread in the system resources. In order to improve the data information processing efficiency, before processing the data information, the management server may allocate the system resource according to a configuration rule, where the configuration rule may be a specific rule for allocating the system resource. The system resources are distributed, so that the delivery thread corresponding to each processing thread in the system resources is determined, and one or more delivery threads corresponding to the processing threads are determined. The system resources comprise a processing thread pool and a submitting thread pool.
In one embodiment, as shown in fig. 3, step S110 includes sub-steps S111, S112 and S113.
And S111, determining the thread number of the processing thread pool.
And determining the number of the corresponding processing threads from the processing thread pool to obtain the thread number of the processing threads.
And S112, performing remainder calculation on the submission threads in the submission thread pool according to the thread number to obtain corresponding calculation results.
And performing remainder calculation on the submission threads in the submission thread pool according to the thread number, namely performing remainder calculation on the number of the submission threads according to the number of the processing threads to obtain a remainder and a quotient.
S113, distributing a corresponding number of delivery threads for each processing thread in the processing thread pool according to the configuration rule and the calculation result.
And distributing corresponding submission threads for the processing threads according to the configuration rules and the calculation results. Specifically, the quotient can be directly used as the number of the corresponding delivery threads allocated to the processing threads, the remaining delivery threads are used as backup delivery threads, and if a certain delivery thread in use is in an idle state in the subsequent operation process, the backup delivery thread can be used to replace the delivery thread which is in the idle state and cannot be used. For example, if the quotient is 5, 5 submission threads are respectively allocated to each processing thread.
The quotient can also be used as the number of the corresponding submission threads distributed to the processing threads, and then the submission threads corresponding to the remainder are randomly distributed to different processing threads.
For example, if the quotient is 5 and the remainder is 4, 5 submission threads may be respectively allocated to each processing thread, and the remaining 4 submission threads may be randomly allocated to 4 different processing threads.
In one embodiment, as shown in fig. 4, step S114 is further included after step S113.
And S114, distributing corresponding memory space for each delivery thread according to a preset distribution value.
After allocating the delivery threads to the processing threads, a corresponding memory space may also be allocated for each delivery thread, and specifically, a corresponding storage space may be allocated for each delivery thread according to the allocation value.
For example, if the allocation value is 20kb, 20kb of storage space is allocated to each delivery thread.
And S120, sending delivery and docking information to the client through the delivery thread corresponding to each processing thread so as to obtain the delivery and docking parameters fed back by the client.
And sending delivery and docking information to the client through the delivery thread corresponding to each processing thread so as to obtain the delivery and docking parameters fed back by the client. Each submitting thread is butted with one or more clients, submitting butting information can be sent to the corresponding client through the submitting threads, the clients feed back corresponding submitting butting parameters to the submitting threads after receiving the submitting butting information, and each submitting thread can receive the submitting butting parameters fed back by the butted clients. And submitting the butt-joint parameters, namely submitting the snapshot information to the specific parameter information of the corresponding client by the submitting thread.
S130, if the transaction data from the transaction server is received, inputting the transaction data into any processing thread for processing, and updating the cached initial data according to a processing result.
And if the transaction data from the transaction server is received, inputting the transaction data into any one of the processing threads for processing so as to update the cached initial data according to a processing result. The management server receives the transaction data from the transaction server, and then inputs the transaction data into a processing thread for processing, the memory of the management server caches initial data, the initial data comprises a map table with the order number as the key value for caching the order price data, and each transaction type (such as a transaction code) maintains a map table with the price as the key value in the memory. And the processing thread processes the cached initial data according to the transaction data to obtain a corresponding processing result, namely, the original cached initial data can be updated according to the processing result.
In one embodiment, as shown in fig. 5, step S130 includes sub-steps S131, S132 and S133.
S131, determining a corresponding processing rule according to the transaction type of the transaction data.
The corresponding processing rule may be determined according to the transaction type of the transaction data, and specifically, the transaction data includes a corresponding transaction type, for example, the transaction type may be an entrustment type, an order withdrawal type, a deal type, or the like. Different transaction types correspond to different data processing rules, and the processing rule corresponding to the transaction type can be determined according to the transaction type of the transaction data.
S132, processing the cache value corresponding to the transaction value of the transaction data in the initial data according to the processing rule to obtain a corresponding processing result.
The processing thread processes the cache value corresponding to the transaction value of the transaction data in the initial data according to the determined processing rule, the transaction data also comprises the transaction value, the transaction value comprises a transaction price and a transaction quantity, the cache value corresponding to the transaction price in the initial data can be determined according to the transaction price, and the cache value is subjected to numerical value processing corresponding to the transaction quantity according to the processing rule, so that a processing result is obtained.
For example, the transaction type is an entrustment type, a value of a corresponding gear in the initial data is determined as a cache value according to a transaction price (entrustment price), and a corresponding processing result is obtained by increasing a transaction quantity (entrustment quantity) on the basis of the cache value to perform numerical processing on corresponding entrustment details.
And if the transaction type is a withdrawal type, correspondingly searching the purchase and sale order of the corresponding gear in the initial data according to the order number in the transaction data, determining a vlaue value of the corresponding gear in the purchase and sale order as a cache value according to the transaction price in the transaction data, and reducing the corresponding transaction quantity (entrusting quantity) on the basis of the cache value to carry out numerical processing on the corresponding entrusting detail to obtain a corresponding processing result.
If the transaction type is a transaction type, correspondingly searching the purchase and sale order of the corresponding gear in the initial data according to the order number in the transaction data, determining a vlaue value of the corresponding gear in the purchase and sale order as a cache value according to the transaction price in the transaction data, and carrying out numerical processing on the corresponding order details by reducing the corresponding transaction quantity (order quantity) on the basis of the cache value to obtain a corresponding processing result.
And S133, updating the corresponding cache value in the initial data according to the processing result.
And updating the corresponding cache value in the initial data according to the processing result, thereby obtaining the updated initial data.
S140, according to the submission docking parameters corresponding to the submission threads, snapshot information corresponding to the submission docking parameters is obtained from the updated initial data.
And acquiring snapshot information corresponding to the submission docking parameters from the updated initial data according to the submission docking parameters corresponding to the submission threads. And acquiring corresponding snapshot information from the updated initial data according to the delivery docking parameters corresponding to the delivery threads.
In one embodiment, as shown in fig. 6, step S140 further includes steps S1401 and S1402.
S1401, judging whether the data sampling frequency corresponding to the submitted docking parameter is higher than a preset sampling frequency value; s1402, if the data sampling frequency corresponding to the submitting docking parameter is higher than the sampling frequency value, configuring the sampling frequency value as the data sampling frequency corresponding to the submitting docking parameter.
Before the snapshot information is obtained, whether the data sampling frequency corresponding to the submitted docking parameter is higher than a preset sampling frequency value or not can be judged, sampling interval time can be set in the submitted docking parameter, the corresponding data sampling frequency is determined according to the sampling interval time, and if the sampling interval time is 2 seconds, the corresponding data sampling frequency is 0.5. Whether the data sampling frequency is higher than the sampling frequency value or not can be judged, and if so, the data sampling frequency corresponding to the submission docking parameter is set as the preset sampling frequency value; and if not, not adjusting the data sampling frequency corresponding to the submitting docking parameter.
The data sampling frequency corresponding to the submitted docking parameters can be controlled by pre-configuring the sampling frequency value, so that the overhigh data sampling frequency corresponding to the submitted docking parameters is avoided. Similarly, a lower sampling frequency value can be preset, and whether the data sampling frequency of the submitted docking parameter is lower than the lower sampling frequency value or not is judged, if not, the data sampling frequency corresponding to the submitted docking parameter is not adjusted; if the sampling frequency is lower than the lower sampling frequency value, the data sampling frequency corresponding to the submitted docking parameter is set to be the lower sampling frequency value. Therefore, data flow control can be carried out according to the requirements of customers, and data sampling and submitting can be carried out according to the set lowest frequency.
In an embodiment, as shown in fig. 7, step S140 includes sub-steps S141 and S142.
And S141, determining a corresponding data range and a data sampling frequency according to the delivery docking parameters.
The corresponding data sampling frequency can be determined according to the sampling interval time in the submission docking parameters, and the price gear required to be submitted is acquired according to the price interval in the submission docking parameters so as to determine the acquired price gear as the corresponding data range.
And if the price interval is 1.5-1.6, determining the gear with the price within 1.5-1.6 in the initial data as the corresponding data range.
And S142, periodically acquiring data information corresponding to the data range from the initial data according to the data sampling frequency as snapshot information corresponding to the delivery docking parameters.
And periodically acquiring data information in a data range from the initial data according to the data sampling frequency, thereby generating snapshot information corresponding to the submitted docking parameters. By the method, corresponding gears and detailed data can be flexibly acquired according to the requirements of the client, so that corresponding snapshot information can be generated.
In addition, if the initial data is in a balanced state, the data which is not changed in the initial data can be cut, and only the data which is changed at this time is reserved to generate corresponding snapshot information, that is, the snapshot information only contains the data which is changed within the sampling interval time, so that the data volume of the generated snapshot information is reduced, and the efficiency of subsequent snapshot information submission is improved.
S150, delivering the snapshot information to the client side which is in butt joint with each delivery thread through the corresponding delivery thread.
And submitting the snapshot information to the client side which is in butt joint with each submission thread through the corresponding submission thread. The acquired snapshot information can be submitted to the client side connected with the submitting thread through the submitting thread, one submitting thread can correspondingly acquire the snapshot information of the client side connected with the submitting thread, and the acquired snapshot information is submitted to one or more client sides connected with the submitting thread.
In one embodiment, as shown in fig. 8, step S150 further includes steps S1501 and S1502 before step S150.
S1501, judging whether the snapshot information exceeds the memory space of the submission thread corresponding to the snapshot information.
Before submitting the snapshot information, whether the snapshot information exceeds the memory space of the submitting thread corresponding to the snapshot information can be judged.
If the data size of the snapshot information is 16kb and the memory space of the submission thread corresponding to the snapshot information is 20kb, the snapshot information does not exceed the memory space of the corresponding submission thread at this time.
S1502, if the snapshot information exceeds the memory space corresponding to the submission thread, dynamically expanding the storage space of the submission thread according to the snapshot information.
If the snapshot information exceeds the memory space corresponding to the submission thread, the memory space of the corresponding submission thread can be expanded according to the data amount of the snapshot information, that is, the memory space with insufficient memory is expanded, so that the memory space of the submission thread meets the submission of the snapshot information. The memory allocated by the submission thread last time can be reused by the submission thread when the snapshot information is submitted each time, and only the part of the space with insufficient memory needs to be expanded, so that memory fragments can be avoided to the greatest extent.
In addition, if the snapshot information does not exceed the memory space corresponding to the submission thread, the storage space of the corresponding submission thread can be reduced, so that memory fragments are further avoided, and the overall utilization efficiency of the memory is improved.
In the information processing method based on resource allocation provided by the embodiment of the invention, system resources of a management server are allocated according to configuration information so as to determine a delivery thread corresponding to each processing thread, delivery docking parameters fed back by a client are obtained through the delivery threads, received transaction data are respectively input into the processing threads for processing so as to update initial data in the processing threads, snapshot information corresponding to the delivery docking parameters is obtained from the updated initial data according to the delivery docking parameters of each delivery thread, and the snapshot information is delivered to the client docked with each delivery thread through the delivery threads. By the method, the received transaction data can be stored through the processing thread, the snapshot information corresponding to the submitting and docking parameters is obtained through the submitting thread, and therefore the corresponding snapshot information is obtained according to the requirements of the clients for feedback, and the transaction data information can be viewed more comprehensively.
The embodiment of the present invention further provides an information processing apparatus based on resource allocation, where the information processing apparatus based on resource allocation is configurable in a management server, and the information processing apparatus based on resource allocation is configured to execute any embodiment of the foregoing information processing method based on resource allocation. Specifically, referring to fig. 9, fig. 9 is a schematic block diagram of an information processing apparatus based on resource allocation according to an embodiment of the present invention.
As shown in fig. 9, the information processing apparatus 100 based on resource configuration includes a resource allocation unit 110, a delivery docking parameter acquisition unit 120, an initial data update unit 130, a snapshot information acquisition unit 140, and a snapshot information delivery unit 150.
The resource allocation unit 110 is configured to allocate the system resources of the management server according to a preset configuration rule, so as to determine a delivery thread corresponding to each processing thread in the system resources.
A submit-docking parameter obtaining unit 120, configured to send submit-docking information to the client through a submit thread corresponding to each processing thread, so as to obtain a submit-docking parameter fed back by the client.
The initial data updating unit 130 is configured to, if transaction data from the transaction server is received, input the transaction data into any one of the processing threads for processing, so as to update the cached initial data according to a processing result.
A snapshot information obtaining unit 140, configured to obtain, according to the delivery docking parameters corresponding to each of the delivery threads, snapshot information corresponding to the delivery docking parameters from the updated initial data.
A snapshot information submitting unit 150, configured to submit the snapshot information to the client that is interfaced with each of the submission threads through the corresponding submission thread.
The information processing device based on resource allocation provided by the embodiment of the invention applies the information processing method based on resource allocation, allocates system resources of a management server according to the configuration information to determine a submission thread corresponding to each processing thread, acquires submission docking parameters fed back by a client through the submission threads, inputs received transaction data into the processing threads respectively for processing so as to update initial data in the processing threads, acquires snapshot information corresponding to the submission docking parameters from the updated initial data according to the submission docking parameters of each submission thread, and submits the snapshot information to the clients docked by each submission thread through the submission threads. By the method, the received transaction data can be stored through the processing thread, and the snapshot information corresponding to the submission docking parameters is obtained through the submission thread, so that the corresponding snapshot information is obtained according to the customer requirements for feedback, and the transaction data information can be viewed more comprehensively.
The above-described information processing apparatus based on resource configuration may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 10.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device can be a server side used for executing an information processing method based on resource configuration so as to receive transaction data from a transaction server and feed snapshot information back to a client side after processing.
Referring to fig. 10, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a storage medium 503 and an internal memory 504.
The storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform an information processing method based on resource allocation, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
The processor 502 is used to provide computing and control capabilities that support the operation of the overall computer device 500.
The internal memory 504 provides an environment for running the computer program 5032 in the storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute the information processing method based on the resource configuration.
The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 10 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing device 500 to which aspects of the present invention may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to run the computer program 5032 stored in the memory, so as to implement the corresponding functions in the information processing method based on resource allocation.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 10 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 10, which are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a volatile or non-volatile computer readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps included in the above-described information processing method based on resource allocation.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a computer-readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. An information processing method based on resource allocation is characterized in that the method is applied to a management server, the management server establishes network connection with a transaction server and a client to transmit data information, and the method comprises the following steps:
allocating system resources of the management server according to preset configuration rules to determine a delivery thread corresponding to each processing thread in the system resources;
sending delivery docking information to the client through a delivery thread corresponding to each processing thread so as to obtain delivery docking parameters fed back by the client;
if transaction data from the transaction server is received, inputting the transaction data into any one of the processing threads for processing so as to update the cached initial data according to a processing result;
acquiring snapshot information corresponding to the submission docking parameters from the updated initial data according to the submission docking parameters corresponding to the submission threads;
and submitting the snapshot information to the client side which is in butt joint with each submitting thread through the corresponding submitting thread.
2. The method according to claim 1, wherein the system resources include a processing thread pool and a delivery thread pool, and the allocating the system resources of the management server according to a preset configuration rule to determine a delivery thread corresponding to each processing thread comprises:
determining the thread number of the processing thread pool;
performing remainder calculation on the submission threads in the submission thread pool according to the thread number to obtain corresponding calculation results;
and distributing a corresponding number of delivery threads for each processing thread in the processing thread pool according to the configuration rule and the calculation result.
3. The method according to claim 2, further comprising, after allocating a corresponding number of delivery threads to each processing thread in the processing thread pool according to the configuration rule and the calculation result:
and distributing corresponding memory space for each delivery thread according to a preset distribution value.
4. The method according to claim 3, wherein before the delivering the snapshot information to the client that is interfaced with each of the delivery threads through the corresponding delivery thread, the method further comprises:
judging whether the snapshot information exceeds the memory space of the submission thread corresponding to the snapshot information;
and if the snapshot information exceeds the memory space corresponding to the submission thread, dynamically expanding the storage space of the submission thread according to the snapshot information.
5. The information processing method based on resource allocation according to claim 1, wherein the inputting the transaction data into any one of the processing threads for processing, so as to update the initial data in each processing thread according to the processing result, comprises:
determining a corresponding processing rule according to the transaction type of the transaction data;
processing the cache value corresponding to the transaction value of the transaction data in the initial data according to the processing rule to obtain a corresponding processing result;
and updating the corresponding cache value in the initial data according to the processing result.
6. The information processing method based on resource allocation according to claim 1, before acquiring, according to the submission docking parameters corresponding to each of the submission threads, snapshot information corresponding to the submission docking parameters from the updated initial data, further comprising:
judging whether the data sampling frequency corresponding to the submitted butting parameter is higher than a preset sampling frequency value or not;
and if the data sampling frequency corresponding to the submission docking parameter is higher than the sampling frequency value, configuring the sampling frequency value as the data sampling frequency corresponding to the submission docking parameter.
7. The information processing method based on resource allocation according to claim 1, wherein the obtaining, according to the delivery docking parameters corresponding to each of the delivery threads, snapshot information corresponding to the delivery docking parameters from the updated initial data includes:
determining a corresponding data range and a data sampling frequency according to the submission docking parameters;
and periodically acquiring data information corresponding to the data range from the initial data according to the data sampling frequency as snapshot information corresponding to the delivery docking parameters.
8. An information processing apparatus based on resource allocation, wherein the apparatus is configured in a management server, the management server establishes a network connection with a transaction server and a client for data information transmission, and the apparatus comprises:
the resource allocation unit is used for allocating the system resources of the management server according to a preset configuration rule so as to determine a delivery thread corresponding to each processing thread in the system resources;
the delivery and docking parameter acquiring unit is used for sending delivery and docking information to the client through a delivery thread corresponding to each processing thread so as to acquire delivery and docking parameters fed back by the client;
the initial data updating unit is used for inputting the transaction data into any one of the processing threads for processing if the transaction data from the transaction server is received, so as to update the cached initial data according to a processing result;
a snapshot information obtaining unit, configured to obtain, according to a delivery docking parameter corresponding to each delivery thread, snapshot information corresponding to the delivery docking parameter from the updated initial data;
and the snapshot information submitting unit is used for submitting the snapshot information to the client side which is in butt joint with each submitting thread through the corresponding submitting thread.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the resource configuration-based information processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the resource configuration-based information processing method according to any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211069820.7A CN115168056B (en) | 2022-09-02 | 2022-09-02 | Information processing method, device, equipment and medium based on resource allocation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211069820.7A CN115168056B (en) | 2022-09-02 | 2022-09-02 | Information processing method, device, equipment and medium based on resource allocation |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115168056A true CN115168056A (en) | 2022-10-11 |
| CN115168056B CN115168056B (en) | 2022-12-02 |
Family
ID=83481176
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211069820.7A Active CN115168056B (en) | 2022-09-02 | 2022-09-02 | Information processing method, device, equipment and medium based on resource allocation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115168056B (en) |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130042001A1 (en) * | 2008-09-29 | 2013-02-14 | Christopher M. Gould | Event queues |
| CN107979570A (en) * | 2016-10-25 | 2018-05-01 | 北京优朋普乐科技有限公司 | Network transceiver resource data processing method and device |
| US20180351816A1 (en) * | 2017-06-02 | 2018-12-06 | Yan Li | Methods and apparatus for parameter tuning using a cloud service |
| CN111638949A (en) * | 2020-04-28 | 2020-09-08 | 深圳壹账通智能科技有限公司 | Time series data segmentation construction method and device and computer equipment |
| CN111767143A (en) * | 2020-06-24 | 2020-10-13 | 中国工商银行股份有限公司 | Transaction data processing method, device, equipment and system |
| CN113190576A (en) * | 2021-06-01 | 2021-07-30 | 京东科技控股股份有限公司 | Data processing method and device, computer equipment and readable storage medium |
| CN113347466A (en) * | 2021-05-18 | 2021-09-03 | 深圳市腾讯网络信息技术有限公司 | Data processing method, device and storage medium |
| CN114691383A (en) * | 2020-12-31 | 2022-07-01 | 京东科技控股股份有限公司 | Data processing method, device, equipment and storage medium |
-
2022
- 2022-09-02 CN CN202211069820.7A patent/CN115168056B/en active Active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130042001A1 (en) * | 2008-09-29 | 2013-02-14 | Christopher M. Gould | Event queues |
| CN107979570A (en) * | 2016-10-25 | 2018-05-01 | 北京优朋普乐科技有限公司 | Network transceiver resource data processing method and device |
| US20180351816A1 (en) * | 2017-06-02 | 2018-12-06 | Yan Li | Methods and apparatus for parameter tuning using a cloud service |
| CN111638949A (en) * | 2020-04-28 | 2020-09-08 | 深圳壹账通智能科技有限公司 | Time series data segmentation construction method and device and computer equipment |
| CN111767143A (en) * | 2020-06-24 | 2020-10-13 | 中国工商银行股份有限公司 | Transaction data processing method, device, equipment and system |
| CN114691383A (en) * | 2020-12-31 | 2022-07-01 | 京东科技控股股份有限公司 | Data processing method, device, equipment and storage medium |
| CN113347466A (en) * | 2021-05-18 | 2021-09-03 | 深圳市腾讯网络信息技术有限公司 | Data processing method, device and storage medium |
| CN113190576A (en) * | 2021-06-01 | 2021-07-30 | 京东科技控股股份有限公司 | Data processing method and device, computer equipment and readable storage medium |
Non-Patent Citations (2)
| Title |
|---|
| QIU TANG等: "A pipelined market data processing architecture to overcome financial data dependency", 《2016 IEEE 35TH INTERNATIONAL PERFORMANCE COMPUTING AND COMMUNICATIONS CONFERENCE (IPCCC)》 * |
| 杨祖龙等: "银行主机批量文件返传处理系统的设计与实现", 《中国金融电脑》 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115168056B (en) | 2022-12-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP1183631A2 (en) | Automated trading system | |
| CN112561485B (en) | Warranty product rule determination method and device, computer equipment and storage medium | |
| CN110706093A (en) | Accounting processing method and device | |
| US11961131B2 (en) | System and method for electronic third-party negotiation automation system and tool | |
| CN107330680A (en) | Red packet control method, device, computer equipment and computer-readable recording medium | |
| CN111062634A (en) | Approval task allocation method and device, computer equipment and storage medium | |
| US11216877B2 (en) | Automated electronic trade matching systems and methods | |
| CN115168056B (en) | Information processing method, device, equipment and medium based on resource allocation | |
| JP2003527690A (en) | System and method for managing information over a distribution network | |
| WO2022121216A1 (en) | Data processing method and apparatus, terminal, and readable storage medium | |
| CN109582445A (en) | Message treatment method, device, electronic equipment and computer readable storage medium | |
| US11386495B2 (en) | Dynamic dissemination of information to network devices | |
| CN111062572A (en) | Task allocation method and device | |
| CN110837421A (en) | Task allocation method and device | |
| KR20190091295A (en) | Systems and methods for processing dynamic peg orders displayed in whole or in part in an electronic trading system | |
| WO2018129489A1 (en) | Systems and methods of sequencing or combining multiple related, but different, transaction requests into a single transaction | |
| CN115099978B (en) | Data processing method and device | |
| CN115222338B (en) | Material purchasing system, purchasing list generation method and component | |
| US20050086430A1 (en) | Method, system, and program for designating a storage group preference order | |
| JPH0638247B2 (en) | How to check the status of multiple deferred requests made by the end user of the system | |
| CN116629556A (en) | Recommendation task distribution method and device, storage medium and electronic equipment | |
| US20230049322A1 (en) | Information processing method, device, system, and computer-readable storage medium | |
| CN114493561A (en) | Information interaction mode replacement method, device, equipment and storage medium | |
| CN113360539B (en) | Market subscription-based subscription information pushing method, device, equipment and medium | |
| CN114493220A (en) | Collaborative method and device for improving project delivery efficiency |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Information processing methods, devices, equipment, and media based on resource allocation Effective date of registration: 20231213 Granted publication date: 20221202 Pledgee: Shanghai Pudong Development Bank Co.,Ltd. Shenzhen Branch Pledgor: Shenzhen Huarui Distributed Technology Co.,Ltd. Registration number: Y2023980071220 |
|
| PE01 | Entry into force of the registration of the contract for pledge of patent right |