CN112669160B - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112669160B
CN112669160B CN202110288517.5A CN202110288517A CN112669160B CN 112669160 B CN112669160 B CN 112669160B CN 202110288517 A CN202110288517 A CN 202110288517A CN 112669160 B CN112669160 B CN 112669160B
Authority
CN
China
Prior art keywords
service node
target
service
amount
target user
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.)
Active
Application number
CN202110288517.5A
Other languages
Chinese (zh)
Other versions
CN112669160A (en
Inventor
李想
廖金财
李丰廷
周兆军
夏杨铭
韩超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN202110288517.5A priority Critical patent/CN112669160B/en
Publication of CN112669160A publication Critical patent/CN112669160A/en
Application granted granted Critical
Publication of CN112669160B publication Critical patent/CN112669160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application provides a data processing method, a data processing device, electronic equipment and a storage medium, and relates to the technical field of data processing. The method can be applied to a data processing platform, a plurality of service nodes are deployed on the data processing platform, and the method comprises the following steps: receiving request information sent by terminal equipment; distributing a business object for a target user on at least one target service node of a data processing platform according to the target type, the target amount and the service node to which the target user belongs, wherein the data processing platform configures the business object with a preset amount for each service node in advance; by applying the method, the business objects can be distributed to the target user on at least one target service node of the data processing platform, cross-service node distribution is realized, the business objects on each service node can be fully utilized, the utilization rate of the business objects is improved, and further the data processing efficiency is improved.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
In the existing distributed data processing platform, respective business objects can be distributed to users on service nodes, and the business objects on different service nodes are independent and do not influence each other. The service object on the current service node can only be used by the user on the current service node, and the user on the non-current service node is not available.
Therefore, in the existing data processing method, if the available amount of the service objects of the current service node is greater than or equal to the request amount of the user on the current service node, the corresponding number of service objects can be successfully allocated to the user, otherwise, the allocation fails.
It can be seen that the existing data processing method is simple, the service objects on each service node in the data processing platform are not fully utilized, and the utilization rate is low.
Disclosure of Invention
An object of the present application is to provide a data processing method, an apparatus, an electronic device, and a storage medium, which can improve the utilization rate of a business object.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, the present invention provides a data processing method applied to a data processing platform, where the data processing platform deploys a plurality of service nodes, and the method includes:
receiving request information sent by terminal equipment, wherein the request information is used for requesting to distribute a target amount and a service object with a target type for a target user;
distributing business objects to the target user on at least one target service node of the data processing platform according to the target type, the target amount and the service node to which the target user belongs, wherein the sum of the amounts of the business objects distributed on the target service nodes is equal to the target amount, and the data processing platform configures the business objects with preset amounts for the service nodes in advance;
and sending response information to the terminal equipment, wherein the response information is used for indicating whether the service object is successfully distributed to the target user.
In an optional embodiment, said allocating, according to the target type, the target amount, and a service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform includes:
if the target type is a first type, determining whether the available amount of a first business object of a service node to which the target user belongs is larger than or equal to the target amount, wherein the first business object is a business object belonging to the first type;
if the available amount of the first business object of the service node to which the target user belongs is larger than or equal to the target amount, distributing the business object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of the first business object of the service node to which the target user belongs according to the target amount.
In an alternative embodiment, the method further comprises:
if the available amount of the first business object of the service node to which the target user belongs is smaller than the target amount, distributing the available amount of the first business object of the service node to which the target user belongs to the target user, and distributing a target residual amount for the target user from service nodes other than the service node to which the target user belongs, wherein the target residual amount is the difference between the target amount and the available amount of the first business object of the service node to which the target user belongs.
In an optional embodiment, the allocating a target remaining amount to the target user from a service node other than the service node to which the target user belongs includes:
acquiring the available amount of the first service object of each service node on the data processing platform recorded on the service node to which the target user belongs;
sequencing service nodes except the service node to which the target user belongs from large to small according to the available amount of the first service object to obtain a service node sequence;
taking the first service node of the service node sequence as an initial distribution service node;
A. if the available amount of the first business object of the distribution service node is larger than or equal to the target remaining amount, distributing the business object of the target amount to the target user on the distribution service node, updating the available amount of the first business object of the distribution service node according to the target remaining amount, determining that the business object is successfully distributed to the target user, and ending;
B. if the available amount of the first business object of the distribution service node is smaller than the target remaining amount, distributing the available amount of the first business object of the distribution service node to the target user, taking a difference value obtained by subtracting the available amount of the first business object of the distribution service node from the target remaining amount as a new target remaining amount, and taking a next service node of the distribution service node in the service node sequence as a new distribution service node;
C. and circularly executing the A-B until the service node sequence is traversed completely, and determining that the service object distribution for the target user fails.
In an optional embodiment, said allocating, according to the target type, the target amount, and a service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform includes:
if the target type is a second type, determining whether the available amount of a second business object of a service node to which the target user belongs is larger than or equal to the target amount, wherein the second business object is a business object belonging to the second type;
if yes, distributing the service object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of a second service object of the service node to which the target user belongs according to the target amount;
if not, determining that the business object distribution for the target user fails.
In an optional implementation manner, after the allocating, according to the target type, the target amount, and the service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform, the method further includes:
and updating and recording the available amount of each target service node after the target service node distributes the service object to the target user to each service node except the target service node.
In an optional implementation manner, the plurality of service nodes of the data processing platform includes a main service node, and if the target service node includes at least two service nodes, after allocating a service object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and the service node to which the target user belongs, the method further includes:
respectively adding the available amount of each target service node after the target service node distributes the first service object to the target user to the available amount of the first service object of the main service node to obtain a new available amount of the first service object of the main service node;
and respectively updating the available amount of the first business object in each target service node to zero, and updating the available amount of the first business object in the target service node to service nodes except the service node to which the target user belongs.
In an optional implementation manner, the plurality of service nodes of the data processing platform include a main service node, where the main service node stores a total amount and a used amount of a first service object of the data processing platform, and the main service node also stores a total amount of a third service object of the data processing platform, where the third service object is a service object belonging to a third type, and the method further includes:
determining a first distribution amount distributed to the first business object by the third business object;
and adding the first distribution amount to a first business object of the main service node, updating the total amount of the first business object in the main service node, and updating the available amount of the first business object in the main service node to a service node except the service node to which the target user belongs.
In an alternative embodiment, the method further comprises:
determining a second allocated amount of the available amount of the first business object to the third business object in each service node;
and adding the second allocated amount to the total amount of the third service object of the data processing platform to obtain a new total amount of the third service object of the data processing platform, and updating the available amount of the first service object in each service node and the total amount of the first service object on the main service node.
In an optional implementation manner, before distributing, according to the target type, the target amount, and the service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform, the method further includes:
and respectively configuring preset amount business objects for each service node according to the historical processing data of each service node.
In a second aspect, the present invention provides a data processing apparatus, applied to a data processing platform, where a plurality of service nodes are deployed on the data processing platform, the apparatus including:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving request information sent by terminal equipment, and the request information is used for requesting to distribute a target amount and a service object with a target type for a target user;
a distribution module, configured to distribute, according to the target type, the target amount, and a service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform, where a sum of the amounts of the service objects distributed on each target service node is equal to the target amount, and the data processing platform configures, in advance, a service object with a preset amount for each service node;
and the sending module is used for sending response information to the terminal equipment, wherein the response information is used for indicating whether the service object is successfully distributed to the target user.
In an optional embodiment, the allocating module is specifically configured to determine, if the target type is a first type, whether an available amount of a first service object of a service node to which the target user belongs is greater than or equal to the target amount, where the first service object is a service object belonging to the first type;
if the available amount of the first business object of the service node to which the target user belongs is larger than or equal to the target amount, distributing the business object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of the first business object of the service node to which the target user belongs according to the target amount.
In an optional implementation manner, the allocating module is further configured to allocate, if the available amount of the first service object of the service node to which the target user belongs is smaller than the target amount, the available amount of the first service object of the service node to which the target user belongs to the target user, and allocate, from a service node other than the service node to which the target user belongs, a target remaining amount to the target user, where the target remaining amount is a difference between the target amount and the available amount of the first service object of the service node to which the target user belongs.
In an optional embodiment, the allocation module is specifically configured to obtain an available amount of the first service object of each service node on the data processing platform, which is recorded on the service node to which the target user belongs;
sequencing service nodes except the service node to which the target user belongs from large to small according to the available amount of the first service object to obtain a service node sequence;
taking the first service node of the service node sequence as an initial distribution service node;
A. if the available amount of the first business object of the distribution service node is larger than or equal to the target remaining amount, distributing the business object of the target amount to the target user on the distribution service node, updating the available amount of the first business object of the distribution service node according to the target remaining amount, determining that the business object is successfully distributed to the target user, and ending;
B. if the available amount of the first business object of the distribution service node is smaller than the target remaining amount, distributing the available amount of the first business object of the distribution service node to the target user, taking a difference value obtained by subtracting the available amount of the first business object of the distribution service node from the target remaining amount as a new target remaining amount, and taking a next service node of the distribution service node in the service node sequence as a new distribution service node;
C. and circularly executing the A-B until the service node sequence is traversed completely, and determining that the service object distribution for the target user fails.
In an optional embodiment, the allocating module is specifically configured to determine, if the target type is a second type, whether an available amount of a second service object of a service node to which the target user belongs is greater than or equal to the target amount, where the second service object is a service object belonging to the second type;
if yes, distributing the service object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of a second service object of the service node to which the target user belongs according to the target amount;
if not, determining that the business object distribution for the target user fails.
In an optional implementation manner, the allocating module is further configured to update and record an available amount after each target service node allocates a service object to the target user, to each service node except the target service node.
In an optional implementation manner, the plurality of service nodes of the data processing platform include a main service node, and if the target service node includes at least two service nodes, the allocation module is further configured to add the available amount after each target service node allocates the first service object to the target user to the available amount of the first service object of the main service node, respectively, to obtain a new available amount of the first service object of the main service node;
and respectively updating the available amount of the first business object in each target service node to zero, and updating the available amount of the first business object in the target service node to service nodes except the service node to which the target user belongs.
In an optional implementation manner, the plurality of service nodes of the data processing platform include a main service node, where the main service node stores a total amount and a used amount of a first service object of the data processing platform, and the main service node also stores a total amount of a third service object of the data processing platform, where the third service object is a service object belonging to a third type, and the apparatus further includes: the updating module is used for determining a first distribution amount distributed to the first business object by the third business object;
and adding the first distribution amount to a first business object of the main service node, updating the total amount of the first business object in the main service node, and updating the available amount of the first business object in the main service node to a service node except the service node to which the target user belongs.
In an optional embodiment, the updating module is further configured to determine a second allocated amount of the available amount of the first service object to the third service object in each service node;
and adding the second allocated amount to the total amount of the third service object of the data processing platform to obtain a new total amount of the third service object of the data processing platform, and updating the available amount of the first service object in each service node and the total amount of the first service object on the main service node.
In an optional embodiment, the allocation module is specifically configured to configure a preset amount of service objects for each service node according to historical processing data of each service node.
In a third aspect, the present invention provides an electronic device comprising: the data processing system comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when an electronic device runs, the processor is communicated with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the data processing method according to any one of the preceding implementation modes.
In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, the computer program, when executed by a processor, performing the steps of the data processing method according to any of the preceding embodiments.
The beneficial effect of this application is:
in the data processing method, the data processing apparatus, the electronic device, and the storage medium provided in the embodiments of the present application, the method may be applied to a data processing platform, where a plurality of service nodes are deployed on the data processing platform, and the method includes: receiving request information sent by terminal equipment, wherein the request information is used for requesting to distribute a target amount and a service object with a target type for a target user; distributing business objects for the target user on at least one target service node of the data processing platform according to the target type, the target amount and the service node to which the target user belongs, wherein the sum of the amounts of the business objects distributed on each target service node is equal to the target amount, and the data processing platform configures the business objects with preset amounts for each service node in advance; by applying the embodiment of the application, the business object can be distributed to the target user on at least one target service node of the data processing platform, so that cross-service node distribution is realized, the business object on each service node can be fully utilized, the utilization rate of the business object is improved, and the data processing efficiency is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a block diagram of a data processing system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of another data processing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another data processing method provided in the embodiment of the present application;
fig. 5 is a schematic flow chart of another data processing method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another data processing method according to an embodiment of the present application;
fig. 7 is a schematic flowchart of another data processing method according to an embodiment of the present application;
fig. 8 is a schematic flowchart of another data processing method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of another data processing method according to an embodiment of the present application;
fig. 10 is a schematic functional block diagram of a data processing apparatus according to an embodiment of the present application;
fig. 11 is a functional block diagram of another data processing apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. 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 application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the existing distributed data processing platform, when respective service objects are allocated to users on service nodes, the service objects on different service nodes are independent and do not affect each other. The service object is specifically represented as a service object on the current service node, which can only be used by users on the current service node, but not by users on non-current service nodes. Therefore, for the distributed data processing platform, the business objects on each service node are not fully utilized, and the utilization rate is low.
Taking a trading scene in the financial field as an example, position data management of the existing trading system is mainly realized through the following modes: in the first mode, each trading node separately manages different position data, and as the number of customers continuously increases, the trading node is split into a plurality of positions, for example, if the position data are all stored in one trading node a, the customers of the trading node B cannot access and use the position data in the trading node a, so that different position data need to be managed under each trading node, and the customers under the current trading node can only use the position data in the current trading node. Because the total position data is dispersedly deployed on a plurality of trading nodes, the position management complexity is increased, and when the position available limit of the trading node where the client is located is insufficient, the client can not make trading requests any more; at this time, if there are a lot of available position lines on other nodes, the position available lines are sufficient but cannot be used for the client, that is, the position data is not fully and effectively utilized. The second method comprises the following steps: the position is managed uniformly, the position data is managed through the position management center independent of the trading nodes, and clients of all the trading nodes can use the position data under the position management center, so that the position data utilization rate can be improved really. It should be noted that position is a financial term, and refers to the amount of a specific commodity, security, currency, etc. held or owned by an individual or entity, for example, the amount of the security that can be used for financing purchase and financing sale provided by the security company for the investor.
In addition, in terms of the transaction request based on the existing transaction system, the most performance loss is due to the competitive use of the position data, and in order to ensure the reliability of the position data in a high concurrency scenario, the transaction processing is usually increased when the position data is processed, but the performance of the transaction is greatly reduced, and particularly when hundreds of thousands or even millions of clients share the same position data, the performance is greatly reduced. Based on a multi-trading-node distributed trading system, customers are distributed on different trading nodes, and common position data are independently stored in a certain node or are evenly distributed to each node, so that trading performance is lost to different degrees. Therefore, the existing data processing method has the problems of low data processing efficiency and insufficient use.
In view of this, an embodiment of the present application provides a data processing method, which may be applied to a data processing platform, where the data processing platform may specifically be a certain transaction platform, and the data processing platform is not limited herein, and a plurality of service nodes may be deployed on the data processing platform. In order to enable those skilled in the art to use the present disclosure, the following embodiments are described in a specific application scenario of a transaction scenario. It will be apparent to those skilled in the art that the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the application. Although some embodiments of the present application are described in the context of a transaction scenario, which is a specific application scenario, it should be understood that this is merely one exemplary embodiment.
Fig. 1 is a schematic architecture diagram of a data processing system according to an embodiment of the present application, and as shown in fig. 1, the data processing system may include: the system comprises a terminal device 110, an Intelligent Automatic Rerouting (IAR) 120 and a distributed cluster, wherein the distributed cluster may establish a communication connection with the terminal device through the IAR, and optionally, a mapping relationship between a user and a service object to which the user belongs may be pre-configured in the IAR, so that a transaction request initiated by the user through the terminal device may be preferentially processed by a service node to which the user belongs through the configuration, thereby improving data processing efficiency. The distributed cluster may include a plurality of service nodes 150, and the plurality of service nodes 150 may be indifferent, or the plurality of service nodes 150 may include a master service node and a plurality of other service nodes, which is not limited herein. In some embodiments, a service node 150 may refer to a server, for example, a plurality of service nodes 150 may communicate via the network 140 to form a distributed cluster, or a service node may refer to a thread in a server, and a plurality of service nodes may be deployed on a server, which is not limited herein. It can be understood that, when the method is applied to a transaction scene, because the method can be implemented based on a distributed cluster, for transaction requests with high concurrency and large capacity, a plurality of transaction requests can implement parallel transaction through a plurality of service nodes, and the data processing efficiency is improved.
It is understood that, for each service node, each service node may include a respective database for storing various data in the transaction process, and data communication may be performed between multiple service nodes based on a communication component in a distributed cluster, and optionally, the communication component may include a basic component for solving a data loose coupling exchange problem in a data processing system, and the basic component may be implemented based on a message queue, and of course, the present application does not limit the specific manner of data communication here, and may be different according to an actual application scenario.
Based on the above description of the data processing system, fig. 2 is a schematic flow chart of a data processing method provided in this embodiment of the present application, where the method may be applied to a data processing platform, and a plurality of service nodes may be deployed on the data processing platform, and in some embodiments, the data processing platform may refer to the above-described distributed cluster. As shown in fig. 2, the method may include:
s101, receiving request information sent by terminal equipment, wherein the request information is used for requesting to distribute a target amount and a service object with a target type for a target user.
The terminal device may be a processing device corresponding to a data processing requester, and in a transaction scenario, the terminal device may be a processing device corresponding to a transaction requester, and the terminal device may be a device capable of initiating request information, such as a computer, a mobile phone, a tablet computer, and the like, which is not limited herein, and the target user is also a user to which the terminal device belongs; the target amount is also the amount of the request for allocating the business object, and in a transaction scenario, the target amount may indicate a transaction request amount, and may optionally be an amount of funds, or may be a number of shares, and the like, which is not limited herein. The business object may indicate a specific business requested to be allocated, and in a transaction scenario, the business object may be a position, and the position may be divided into a plurality of types according to an actual application scenario, for example, in a financing ticket scenario, the position may be divided into a core position, a business position, and a special position. Wherein, the core position can only be one under a security dealer, and the managed information is the total amount information of the financing private households, the financing private households and the like, and can be used for allocating service positions and special positions; the service positions can be multiple and used for managing the fund provided for the client to be used for financing the purchase, the shares sold by the financing instrument and the like, one client can only specify a specific service position, a plurality of clients can share one service position, the order is entrusted to carry out common competition, the rule of first arrival and first arrival is followed, the service positions can support multiple service nodes, namely, each service node can comprise a certain number of service positions; the special position can also be provided with a plurality of funds, shares and the like which are specially provided for a special client to use independently, the special position allows a plurality of accounts to be associated (a plurality of accounts of the same client are divided into a main account and an auxiliary account), and the special position and the client are positioned in the same service node.
It can be understood that, in the data processing process, the target user may send request information to the data processing platform through the terminal device, where the request information may carry the target amount and the target type of the service object requested to be allocated, and the data processing platform may receive the request information.
S102, distributing a business object for the target user on at least one target service node of the data processing platform according to the target type, the target amount and the service node to which the target user belongs.
The sum of the amounts of the business objects distributed on each target service node is equal to the target amount, and the data processing platform configures the business objects with preset amounts for each service node in advance.
The service node to which the target user belongs may correspond to a corresponding service node identifier, and based on the above description of the data processing system, it may be understood that the service node to which the target user belongs may be determined according to a mapping relationship between the user identifier and the service node identifier. After receiving the request information, the data processing platform may determine, according to the target type of the request, the target amount, and the service node to which the target user belongs, at least one service node among the plurality of service nodes as the target service node, and allocate a service object to the target user on the target service node, where it may be understood that the target service node may include the service node to which the target user belongs.
It should be noted that, for each service node, the data processing platform may configure a preset amount of service objects for each service node in advance. For example, in a transaction scenario, the service object may be a position, see the above description about the position type, optionally, the data processing platform may configure a preset amount of service positions and specific positions for each service node, and a sum of the service positions and the specific positions of each service node may be equal to the core position, it may be understood that, when a target user is allocated with a target amount and has a position of the target type, a sum of the amounts of the positions allocated on each target service node should be equal to the target amount, of course, the application does not limit the target type here, which may be a service position, or may be a specific position, and does not limit the size of the target amount, and may be different according to an actual application scenario.
S103, sending response information to the terminal equipment, wherein the response information is used for indicating whether the business object is successfully distributed to the target user.
For the data processing platform, after the allocation is completed, the data processing platform may send response information to the terminal device, where the response information may indicate a result of the allocation, that is, whether the allocation is successful or failed, and it can be understood that the terminal device may know the result of the allocation after receiving the response information.
To sum up, the data processing method provided in the embodiment of the present application may be applied to a data processing platform, where a plurality of service nodes are deployed on the data processing platform, and the method includes: receiving request information sent by terminal equipment, wherein the request information is used for requesting to distribute a target amount and a service object with a target type for a target user; distributing business objects for the target user on at least one target service node of the data processing platform according to the target type, the target amount and the service node to which the target user belongs, wherein the sum of the amounts of the business objects distributed on each target service node is equal to the target amount, and the data processing platform configures the business objects with preset amounts for each service node in advance; by applying the embodiment of the application, the business object can be distributed to the target user on at least one target service node of the data processing platform, so that cross-service node distribution is realized, the business object on each service node can be fully utilized, the utilization rate of the business object is improved, and the data processing efficiency is further improved.
Fig. 3 is a schematic flow chart of another data processing method according to an embodiment of the present application. Optionally, as shown in fig. 3, the allocating, according to the target type, the target amount, and the service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform includes:
s201, if the target type is the first type, determining whether the available amount of a first business object of a service node to which the target user belongs is larger than or equal to the target amount, wherein the first business object is a business object belonging to the first type.
S202, if the available amount of the first business object of the service node to which the target user belongs is larger than or equal to the target amount, distributing the business object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of the first business object of the service node to which the target user belongs according to the target amount.
S203, if the available amount of the first business object of the service node to which the target user belongs is smaller than the target amount, distributing the available amount of the first business object of the service node to which the target user belongs to the target user, and distributing the target residual amount to the target user from service nodes except the service node to which the target user belongs.
The target remaining amount is the difference between the target amount and the available amount of the first service object of the service node to which the target user belongs.
When distributing the business object for the target user on at least one target service node of the data processing platform, the business object can be distributed according to the target amount and the available amount of the business object on the service node to which the target user belongs.
Optionally, in a transaction scenario, the first type may be a service position type, that is, if the target type is the service position type, it may be determined whether an available amount of the service position of the service node to which the target user belongs is greater than or equal to a target amount, and if the available amount is greater than or equal to the target amount, the position of the target amount may be allocated to the target user on the service node to which the target user belongs; otherwise, the available amount of the service position of the service node to which the target user belongs may be allocated to the target user, and a target remaining amount, which is the difference between the target amount and the available amount of the service position of the service node to which the target user belongs, may be allocated to the target user from a service node other than the service node to which the target user belongs in the data processing platform.
To sum up, when the embodiment of the present application is applied to a transaction scenario, wherein when a service position is allocated to a target user, the service position available on a service node to which the target user belongs may be preferentially used for allocation, and when the service position available on the service node to which the target user belongs is insufficient, deduction is performed from other service nodes, thereby implementing flexible expansion of the service nodes, and fully utilizing the service positions on the service nodes, thereby improving data processing efficiency.
Fig. 4 is a schematic flowchart of another data processing method according to an embodiment of the present application. Optionally, as shown in fig. 4, the allocating a target remaining amount to the target user from a service node other than the service node to which the target user belongs may include:
s301, obtaining the available amount of the first service object of each service node on the data processing platform recorded on the service node to which the target user belongs.
S302, sequencing service nodes except the service node to which the target user belongs from large to small according to the available amount of the first service object to obtain a service node sequence.
S303, according to the service node sequence, determining a distribution service node in service nodes except the service node to which the target user belongs, and distributing the target residual amount to the target user on the distribution service node.
The available amount of the first service object of each service node recorded on the service node to which the target user belongs can be obtained, and the available amounts of the first service objects of the service nodes recorded on the service node to which the target user belongs are sorted from large to small, so that a corresponding service node sequence can be obtained, the distribution service node can be determined according to the service node sequence, and further the target residual amount can be distributed to the target user on the distribution service node. Of course, the present application does not limit the specific sorting manner, and may be as small as large as possible, and a corresponding sorting algorithm may be selected according to an actual application scenario.
It can be understood that, when determining to allocate a service node according to a service node sequence in a transaction scenario, the service node with a larger available amount of a service position can be preferentially used as an allocation service node, so that when allocating a target remaining amount to a target user through the allocation service node, the number of the allocation service nodes can be reduced, the number of times of crossing the service nodes can be reduced, and the data processing efficiency can be improved.
Fig. 5 is a schematic flow chart of another data processing method according to an embodiment of the present application. In some embodiments, as shown in fig. 5, a distribution service node may be determined in a service node other than the service node to which the target user belongs according to the following process, and the target remaining amount is distributed to the target user through the distribution service node, where the specific content is as follows:
s401, taking the first service node of the service node sequence as an initial distribution service node.
S402, if the available amount of the first business object of the distribution service node is larger than or equal to the target remaining amount, distributing the business object of the target amount to the target user on the distribution service node, updating the available amount of the first business object of the distribution service node according to the target remaining amount, determining that the business object is successfully distributed to the target user, and ending.
S403, if the available amount of the first business object of the distribution service node is smaller than the target remaining amount, distributing the available amount of the first business object of the distribution service node to the target user, taking the difference value obtained by subtracting the available amount of the first business object of the distribution service node from the target remaining amount as a new target remaining amount, and taking the next service node of the distribution service node in the service node sequence as a new distribution service node.
And S404, circularly executing the step S402 and the step S403 until the service node sequence is traversed, and determining that the business object distribution for the target user fails.
In the transaction scenario, taking the first service object as the service position as an example, based on the service node sequence obtained in step S302, the first service node in the service node sequence may be used as an initial distribution service node, and whether the available amount of the service position of the distribution service node is greater than or equal to the target remaining amount is compared, if so, the target user may be allocated a position of the target amount on the allocation service node, and if not, the available amount of the service position of the allocation service node may be allocated to the target user, a new target remaining amount is determined, and using a service node next to the assigned service node in the sequence of service nodes as a new assigned service node, and according to the new distribution service node and the new target residual amount, continuously distributing the target residual amount for the target user on the new distribution service node. It can be understood that, if the above steps S402 and S403 are executed in a loop until the service node sequence is traversed completely, that is, there is no service node that can further allocate the remaining amount of the first service object to the target user, it may be determined that allocation of the position to the target user fails at this time.
In some embodiments, when the method is applied to a transaction scenario, an available amount of a service position of a service node to which a target user belongs is allocated to the target user, and a target remaining amount is allocated to the target user from a service node other than the service node to which the target user belongs, for the service node to which the target user belongs, a service node other than the service node to which the target user belongs may be called by a Remote Procedure Call (RPC) to deduct the service position, and of course, an actual calling manner is not limited thereto. Therefore, by applying the embodiment of the application, because the data processing across the service nodes can be realized based on the internal function call, under the condition that the available amount of the first service object on each service node can be fully utilized and the utilization rate of the first service object is improved, the embodiment of the application can also reduce the network delay and improve the data processing efficiency.
Fig. 6 is a schematic flowchart of another data processing method according to an embodiment of the present application. Optionally, as shown in fig. 6, the allocating, according to the target type, the target amount, and the service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform includes:
s501, if the target type is the second type, determining whether the available amount of a second service object of the service node to which the target user belongs is larger than or equal to the target amount, wherein the second service object is a service object belonging to the second type.
S502, if yes, distributing the service object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of the second service object of the service node to which the target user belongs according to the target amount.
S503, if not, determining that the business object distribution for the target user fails.
In a trading scenario, the second type may be a special position type, that is, when the target type is the special position type, and a position is allocated to the target user, it may be determined whether an available amount of the special position of the service node to which the target user belongs is greater than or equal to a target amount, if so, the position of the target amount may be allocated to the target user on the service node to which the target user belongs, otherwise, it is described that the special position on the service node to which the target user belongs is insufficient to be allocated to the target user, and it may be determined that the allocation of the position to the target user fails. Of course, the second type is not limited herein, and the second type may be other position types according to the actual application scenario.
Optionally, after allocating a service object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and the service node to which the target user belongs, the method further includes:
and updating and recording the available amount of each target service node after the target service node distributes the service object to the target user to each service node except the target service node.
In some embodiments, after a service object is allocated to a target user on at least one target service node of a data processing platform, it can be understood that, at this time, an available amount of the service object on the target service node changes, and then the available amount of the service object on each allocated target service node can be updated and recorded to each service node except the target service node, so that the available amount of the target service node can be updated and recorded in real time on each other service node, and when a position is allocated to the target user across the service nodes, the available amount of each service node can be known clearly, thereby improving allocation efficiency.
Optionally, when specifically performing the update, the update may be implemented based on a message update component of the distributed cluster, for example, after each target service node allocates a position to a target user, each target component may asynchronously push an available amount of each service object to the push platform, the push platform may further push the available amount after each target service node allocates a position to a target user to each service node except the target service node, and then each service node may update the record.
Fig. 7 is a schematic flowchart of another data processing method according to an embodiment of the present application. Optionally, the plurality of service nodes of the transaction platform include a main service node, and if the target service node includes at least two service nodes, as shown in fig. 7, after allocating a service object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and the service node to which the target user belongs, the method further includes:
s601, respectively adding the available amount of each target service node after the target service node distributes the first service object to the target user to the available amount of the first service object of the main service node to obtain a new available amount of the first service object of the main service node.
S602, respectively updating the available amount of the first business object in each target service node to zero, and updating the available amount of the first business object in the target service node to service nodes except the service node to which the target user belongs.
The main service node may be any one of a plurality of service nodes of the data processing platform, the main service node may be a pre-specified or default service node, for example, the service node with the smallest service node identifier may be used, but not limited thereto, the target service node may include at least two service nodes, that is, the first service object needs to be allocated to the target user on at least two target service nodes, it is understood that when the first service object is allocated to the target user on at least two target service nodes, the available amount of the first service object on the target service node will decrease, then next time in response to the request information sent by the other terminal device, when the first service object is allocated to the other user, there may be a need to deduct the first service object across a plurality of service nodes, which may seriously decrease the data processing efficiency, therefore, if the target service nodes include at least two, the available amount after each target service node allocates the first service object to the target user can be respectively added to the available amount of the first service object of the main service node, at this time, a new available amount of the first service object of the main service node is obtained, and the available amount of the first service object in each target service node is updated to zero.
Fig. 8 is a schematic flowchart of another data processing method according to an embodiment of the present application. Optionally, the multiple service nodes of the data processing platform include a main service node, where the main service node stores a total amount and a used amount of a first service object of the data processing platform, and the main service node also stores a total amount of a third service object of the service node platform, and the third service object is a service object belonging to a third type, as shown in fig. 8, where the method further includes:
s701, determining a first distribution amount distributed to the first business object by the third business object.
S702, adding the first distribution amount to the first business object of the main service node, updating the total amount of the first business object in the main service node, and updating the available amount of the first business object in the main service node to a service node except the service node to which the target user belongs.
Taking a transaction scenario as an example, in the transaction scenario, the third type may be a core position type, and the third service object is a core position, as can be seen from the foregoing description, the core position manages information of total amounts of financing specials, and the like, and may be used to allocate the core position, the specials, and the like, for the main service node, the main service node may store the total amount of the core position, the total amount of the service position, and the used amount of the service position in the data processing platform.
In some embodiments, according to an actual application scenario, if the main service node further stores a total amount of a third service object (core position) of the data processing platform, a first allocation amount allocated to the first service object (service position) by the third service object (core position) may be determined, the first allocation amount is added to the first service object (service position) of the main service node, the total amount of the first service object (service position) in the main service node is updated, and meanwhile, an available amount of the first service object (service position) in the main service node is updated to a service node other than the service node to which the target user belongs, so that it may be ensured that other service nodes may update records in real time, and synchronization of the available amount of the first service object (service position) between service nodes is achieved.
Fig. 9 is a schematic flowchart of another data processing method according to an embodiment of the present application. Optionally, as shown in fig. 9, the method further includes:
s801, determining a second distribution amount of the available amount of the first service object to the third service object in each service node.
S802, adding the second distributed amount to the total amount of the core position of the data processing platform to obtain a new total amount of a third service object of the data processing platform, and updating the available amount of the first service object in each service node and the total amount of the first service object on the main service node.
In some embodiments, taking a transaction scenario as an example, for each service node, the available amount of the first service object (service position) in each service node may also be allocated (allocated) to the third service object (core position), and when the allocation is specifically performed, the available amount of the first service object (service position) in each service node may be first determined to be allocated to the second allocated amount of the third service object (core position), and the second allocated amount may be further added to the total amount of the third service object (core position), so as to obtain a new total amount of the third service object (core position), and the available amount of the first service object (service position) in each service node and the total amount of the first service object (service position) in the main service node are asynchronously updated according to the second allocated amount, as can be seen, the application embodiment is applied in the transaction scenario, the method can realize the allocation between the service position and the core position and improve the applicability of the method.
Optionally, when determining that the available amount of the service position in each service node is allocated to the second transfer amount of the core position, applying to a transaction scenario, the allocation may be performed according to the following method: and obtaining the available amount of the service positions in each service node, sequencing each service node from small to large according to the available amount of the service positions to obtain a sequencing sequence, and determining the distribution sequence of each service node according to the sequencing sequence. Optionally, when the allocation order of each service node is determined, the service node with the smaller available amount may be preferentially allocated, so that the fragmentary positions of each service node may be reduced, the situation that a transaction request needs to span multiple service nodes is avoided, and the data processing efficiency is improved.
Optionally, before allocating a position to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and the service node to which the target user belongs, the method further includes:
and respectively configuring preset amount business objects for each service node according to the historical transaction data of each service node.
In some embodiments, when configuring a preset amount of service objects for each service node, the preset amount of service objects may be configured for each service node based on a preset policy mechanism by processing data according to history of each service node. Optionally, historical transaction data can be analyzed, used amounts of positions in the past preset time (for example, one month, half a year and the like) of each service node are summarized, and a usage average of the amounts of the positions in a single transaction day is calculated, so that a usage proportion of the available amounts of the positions between each service node is obtained. For example, for the position fund available amount, the proportion is directly used for distribution; for the available amount of position shares, since shares are generally traded in whole hundred, the maximum whole hundred of each service node can be calculated proportionally, and the remaining scattered parts are all distributed to the main service node. Based on the strategy, the position with the proper amount can be configured for each service node to a certain extent, the position utilization rate is improved, the frequency of position allocation distribution in the transaction is reduced, and therefore the transaction performance is improved.
In summary, when the data processing method provided by the embodiment of the application is applied to a transaction scene, position data can be merged into each service node, each transaction request preferentially uses the position of the service node, the position pressure is distributed into each service node, the maximum use of position quota can be ensured, the position cannot be overdrawn or idled, and the position can be distributed to a target user across service nodes based on internal function calling, so that network delay can be reduced, and the data processing efficiency can be improved; secondly, if a new service node needs to be added in the transaction platform, the position distribution operation can be realized, and the deployment efficiency of the new service node can be improved.
Fig. 10 is a functional module schematic diagram of a data processing apparatus according to an embodiment of the present application, where the apparatus may be applied to a data processing platform, and a plurality of service nodes may be deployed on the trading platform, and the basic principle and the resulting technical effect of the apparatus are the same as those of the foregoing corresponding method embodiment, and for a brief description, reference may be made to corresponding contents in the method embodiment for a part not mentioned in this embodiment. As shown in fig. 10, the data processing apparatus 300 may include:
a receiving module 310, configured to receive a transaction request sent by a terminal device, where the transaction request is used to request that a target amount is allocated to a target user and has a position of a target type;
a distribution module 320, configured to distribute positions for the target user on at least one target service node of the transaction platform according to the target type, the target amount, and the service node information to which the target user belongs, where a sum of the amounts of the distributed positions on each target service node is equal to the target amount, and the transaction platform configures positions of preset amounts for each service node in advance;
a sending module 330, configured to send response information to the terminal device, where the response information is used to indicate whether the position is successfully allocated to the target user.
In an optional embodiment, the allocating module 320 is specifically configured to determine, if the target type is the first type, whether an available amount of a first service object of a service node to which the target user belongs is greater than or equal to the target amount, where the first service object is a service object belonging to the first type;
and if the available amount of the first business object of the service node to which the target user belongs is larger than or equal to the target amount, distributing the business object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of the first business object of the service node to which the target user belongs according to the target amount.
In an optional embodiment, the allocating module 320 is further configured to allocate, if the available amount of the first service object of the service node to which the target user belongs is smaller than the target amount, the available amount of the first service object of the service node to which the target user belongs to the target user, and allocate, to the target user, a target remaining amount from a service node other than the service node to which the target user belongs, where the target remaining amount is a difference between the target amount and the available amount of the first service object of the service node to which the target user belongs.
In an optional embodiment, the allocating module 320 is specifically configured to obtain an available amount of the first service object of each service node on the data processing platform, which is recorded on the service node to which the target user belongs;
sequencing service nodes except the service node to which the target user belongs from large to small according to the available amount of the first service object to obtain a service node sequence;
taking the first service node of the service node sequence as an initial distribution service node;
A. if the available amount of the first service object of the distribution service node is larger than or equal to the target remaining amount, distributing the service object of the target amount for the target user on the distribution service node, updating the available amount of the first service object of the distribution service node according to the target remaining amount, determining that the service object is successfully distributed for the target user, and ending;
B. if the available amount of the first service object of the distribution service node is smaller than the target remaining amount, distributing the available amount of the first service object of the distribution service node to a target user, taking a difference value obtained by subtracting the available amount of the first service object of the distribution service node from the target remaining amount as a new target remaining amount, and taking a next service node of the distribution service node in the service node sequence as a new distribution service node;
C. and circularly executing the A-B until the service node sequence is traversed completely, and determining that the service object distribution for the target user fails.
In an optional embodiment, the allocating module 320 is specifically configured to determine, if the target type is the second type, whether an available amount of a second service object of a service node to which the target user belongs is greater than or equal to the target amount, where the second service object is a service object belonging to the second type;
if so, distributing a target amount service object for the target user on the service node to which the target user belongs, and updating the available amount of a second service object of the service node to which the target user belongs according to the target amount;
if not, determining that the business object distribution for the target user fails.
In an optional embodiment, the allocating module 320 is further configured to update and record the available amount after each target service node allocates the service object to the target user, to each service node except the target service node.
In an optional embodiment, the plurality of service nodes of the data processing platform include a main service node, and if the target service node includes at least two service nodes, the allocating module is further configured to respectively add the available amount of the first service object allocated by each target service node to the target user to the available amount of the first service object of the main service node, so as to obtain a new available amount of the first service object of the main service node;
and respectively updating the available amount of the first service object in each target service node to zero, and updating the available amount of the first service object in the target service node to service nodes except the service node to which the target user belongs.
Fig. 11 is a functional block diagram of another data processing apparatus according to an embodiment of the present disclosure. In an optional implementation manner, the multiple service nodes of the data processing platform include a main service node, where the main service node stores a total amount and a used amount of a first service object of the data processing platform, and the main service node also stores a total amount of a third service object of the data processing platform, where the third service object is a service object belonging to a third type, as shown in fig. 11, the data processing apparatus 300 further includes: an updating module 350, configured to determine a first allocation amount allocated to the first business object by the third business object;
and adding the first distribution amount to the first business object of the main service node, updating the total amount of the first business object in the main service node, and updating the available amount of the first business object in the main service node to a service node except the service node to which the target user belongs.
In an alternative embodiment, as shown in fig. 11, the updating module 350 is further configured to determine a second allocated amount for allocating the available amount of the first service object to the third service object in each service node;
and adding the second allocated amount to the total amount of the third service object of the data processing platform to obtain a new total amount of the third service object of the data processing platform, and updating the available amount of the first service object in each service node and the total amount of the first service object on the main service node.
In an optional embodiment, the allocating module 320 is further configured to configure service objects with preset amounts for each service node according to the historical processing data of each service node.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 12, the electronic device may include: a processor 510, a storage medium 520, and a bus 530, the storage medium 520 storing machine-readable instructions executable by the processor 510, the processor 510 communicating with the storage medium 520 via the bus 530 when the electronic device is operating, the processor 510 executing the machine-readable instructions to perform the steps of the above-described method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program performs the steps of the above method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or 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 be in an electrical, mechanical or other form.
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.
In addition, functional units in the embodiments of the present application 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, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (20)

1. A data processing method is applied to a data processing platform, a plurality of service nodes are deployed on the data processing platform, and the method comprises the following steps:
receiving request information sent by terminal equipment, wherein the request information is used for requesting to distribute a target amount and a service object with a target type for a target user;
distributing business objects to the target user on at least one target service node of the data processing platform according to the target type, the target amount and the service node to which the target user belongs, wherein the sum of the amounts of the business objects distributed on the target service nodes is equal to the target amount, and the data processing platform configures the business objects with preset amounts for the service nodes in advance;
sending response information to the terminal equipment, wherein the response information is used for indicating whether the service object is successfully distributed to the target user or not;
the method comprises the following steps that a plurality of service nodes of the data processing platform comprise a main service node, the main service node stores the total amount and the used amount of a first service object of the data processing platform, the main service node also stores the total amount of a third service object of the data processing platform, the first service object is a service object belonging to a first type, the third service object is a service object belonging to a third type, and the method further comprises the following steps:
determining a first distribution amount distributed to the first business object by the third business object;
and adding the first distribution amount to a first business object of the main service node, updating the total amount of the first business object in the main service node, and updating the available amount of the first business object in the main service node to a service node except the service node to which the target user belongs.
2. The method of claim 1, wherein said assigning a business object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and a service node to which the target user belongs comprises:
if the target type is the first type, determining whether the available amount of a first service object of a service node to which the target user belongs is larger than or equal to the target amount;
if the available amount of the first business object of the service node to which the target user belongs is larger than or equal to the target amount, distributing the business object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of the first business object of the service node to which the target user belongs according to the target amount.
3. The method of claim 2, further comprising:
if the available amount of the first business object of the service node to which the target user belongs is smaller than the target amount, distributing the available amount of the first business object of the service node to which the target user belongs to the target user, and distributing a target residual amount for the target user from service nodes other than the service node to which the target user belongs, wherein the target residual amount is the difference between the target amount and the available amount of the first business object of the service node to which the target user belongs.
4. The method of claim 3, wherein the allocating the target amount remaining for the target user from a service node other than the service node to which the target user belongs comprises:
acquiring the available amount of the first service object of each service node on the data processing platform recorded on the service node to which the target user belongs;
sequencing service nodes except the service node to which the target user belongs from large to small according to the available amount of the first service object to obtain a service node sequence;
taking the first service node of the service node sequence as an initial distribution service node;
A. if the available amount of the first business object of the distribution service node is larger than or equal to the target remaining amount, distributing the business object of the target amount to the target user on the distribution service node, updating the available amount of the first business object of the distribution service node according to the target remaining amount, determining that the business object is successfully distributed to the target user, and ending;
B. if the available amount of the first business object of the distribution service node is smaller than the target remaining amount, distributing the available amount of the first business object of the distribution service node to the target user, taking a difference value obtained by subtracting the available amount of the first business object of the distribution service node from the target remaining amount as a new target remaining amount, and taking a next service node of the distribution service node in the service node sequence as a new distribution service node;
C. and circularly executing the A-B until the service node sequence is traversed completely, and determining that the service object distribution for the target user fails.
5. The method of claim 1, wherein said assigning a business object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and a service node to which the target user belongs comprises:
if the target type is a second type, determining whether the available amount of a second business object of a service node to which the target user belongs is larger than or equal to the target amount, wherein the second business object is a business object belonging to the second type;
if yes, distributing the service object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of a second service object of the service node to which the target user belongs according to the target amount;
if not, determining that the business object distribution for the target user fails.
6. The method according to any of claims 1-5, wherein after assigning a business object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and a service node to which the target user belongs, the method further comprises:
and updating and recording the available amount of each target service node after the target service node distributes the service object to the target user to each service node except the target service node.
7. The method according to any of claims 2-5, wherein the plurality of service nodes of the data processing platform includes a main service node, and if the target service node includes at least two service nodes, after allocating the service object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and the service node to which the target user belongs, the method further includes:
respectively adding the available amount of each target service node after the target service node distributes the first service object to the target user to the available amount of the first service object of the main service node to obtain a new available amount of the first service object of the main service node;
and respectively updating the available amount of the first business object in each target service node to zero, and updating the available amount of the first business object in the target service node to service nodes except the service node to which the target user belongs.
8. The method according to any one of claims 2-5, further comprising:
determining a second allocated amount of the available amount of the first business object to the third business object in each service node;
and adding the second allocated amount to the total amount of the third service object of the data processing platform to obtain a new total amount of the third service object of the data processing platform, and updating the available amount of the first service object in each service node and the total amount of the first service object on the main service node.
9. The method according to any of claims 1-5, wherein before assigning a business object to the target user on at least one target service node of the data processing platform according to the target type, the target amount, and a service node to which the target user belongs, further comprising:
and respectively configuring preset amount business objects for each service node according to the historical processing data of each service node.
10. A data processing apparatus, for use in a data processing platform on which a plurality of service nodes are deployed, the apparatus comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving request information sent by terminal equipment, and the request information is used for requesting to distribute a target amount and a service object with a target type for a target user;
a distribution module, configured to distribute, according to the target type, the target amount, and a service node to which the target user belongs, a service object to the target user on at least one target service node of the data processing platform, where a sum of the amounts of the service objects distributed on each target service node is equal to the target amount, and the data processing platform configures, in advance, a service object with a preset amount for each service node;
a sending module, configured to send response information to the terminal device, where the response information is used to indicate whether a service object is successfully allocated to the target user;
the multiple service nodes of the data processing platform include a main service node, the main service node stores the total amount and used amount of a first service object of the data processing platform, the main service node also stores the total amount of a third service object of the data processing platform, the first service object is a service object belonging to a first type, the third service object is a service object belonging to a third type, and the apparatus further includes: the updating module is used for determining a first distribution amount distributed to the first business object by the third business object;
and adding the first distribution amount to a first business object of the main service node, updating the total amount of the first business object in the main service node, and updating the available amount of the first business object in the main service node to a service node except the service node to which the target user belongs.
11. The apparatus according to claim 10, wherein the allocating module is specifically configured to determine, if the target type is a first type, whether an available amount of a first service object of a service node to which the target user belongs is greater than or equal to the target amount;
if the available amount of the first business object of the service node to which the target user belongs is larger than or equal to the target amount, distributing the business object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of the first business object of the service node to which the target user belongs according to the target amount.
12. The apparatus of claim 11, wherein the allocating module is further configured to allocate, if the available amount of the first service object of the service node to which the target user belongs is smaller than the target amount, the available amount of the first service object of the service node to which the target user belongs to the target user, and allocate, from a service node other than the service node to which the target user belongs, a target remaining amount to the target user, where the target remaining amount is a difference between the target amount and the available amount of the first service object of the service node to which the target user belongs.
13. The apparatus according to claim 12, wherein the allocating module is specifically configured to obtain an available amount of the first service object of each service node on the data processing platform, which is recorded on the service node to which the target user belongs;
sequencing service nodes except the service node to which the target user belongs from large to small according to the available amount of the first service object to obtain a service node sequence;
taking the first service node of the service node sequence as an initial distribution service node;
A. if the available amount of the first business object of the distribution service node is larger than or equal to the target remaining amount, distributing the business object of the target amount to the target user on the distribution service node, updating the available amount of the first business object of the distribution service node according to the target remaining amount, determining that the business object is successfully distributed to the target user, and ending;
B. if the available amount of the first business object of the distribution service node is smaller than the target remaining amount, distributing the available amount of the first business object of the distribution service node to the target user, taking a difference value obtained by subtracting the available amount of the first business object of the distribution service node from the target remaining amount as a new target remaining amount, and taking a next service node of the distribution service node in the service node sequence as a new distribution service node;
C. and circularly executing the A-B until the service node sequence is traversed completely, and determining that the service object distribution for the target user fails.
14. The apparatus according to claim 10, wherein the allocating module is specifically configured to determine, if the target type is a second type, whether an available amount of a second service object of a service node to which the target user belongs is greater than or equal to the target amount, where the second service object is a service object belonging to the second type;
if yes, distributing the service object of the target amount to the target user on the service node to which the target user belongs, and updating the available amount of a second service object of the service node to which the target user belongs according to the target amount;
if not, determining that the business object distribution for the target user fails.
15. The apparatus according to any of claims 10-14, wherein the allocating module is further configured to update and record available amount after each target service node allocates the business object to the target user, to each service node except the target service node.
16. The apparatus according to any one of claims 11 to 14, wherein the plurality of service nodes of the data processing platform includes a main service node, and if the target service node includes at least two service nodes, the allocating module is further configured to add, to the available amount of the first service object of the main service node, the available amount after each target service node allocates the first service object to the target user, respectively, to obtain a new available amount of the first service object of the main service node;
and respectively updating the available amount of the first business object in each target service node to zero, and updating the available amount of the first business object in the target service node to service nodes except the service node to which the target user belongs.
17. The apparatus according to any of claims 11-14, wherein the updating module is further configured to determine a second allocated amount for allocating the available amount of the first service object to the third service object in each of the service nodes;
and adding the second allocated amount to the total amount of the third service object of the data processing platform to obtain a new total amount of the third service object of the data processing platform, and updating the available amount of the first service object in each service node and the total amount of the first service object on the main service node.
18. The apparatus according to any one of claims 10 to 14, wherein the allocating module is further configured to configure a preset amount of service objects for each service node according to the historical processing data of each service node.
19. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the data processing method according to any one of claims 1 to 9.
20. A storage medium, having stored thereon a computer program for performing the steps of the data processing method according to any one of claims 1 to 9 when executed by a processor.
CN202110288517.5A 2021-03-18 2021-03-18 Data processing method and device, electronic equipment and storage medium Active CN112669160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110288517.5A CN112669160B (en) 2021-03-18 2021-03-18 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110288517.5A CN112669160B (en) 2021-03-18 2021-03-18 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112669160A CN112669160A (en) 2021-04-16
CN112669160B true CN112669160B (en) 2021-06-29

Family

ID=75399556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110288517.5A Active CN112669160B (en) 2021-03-18 2021-03-18 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112669160B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114466067B (en) * 2021-12-21 2023-08-04 天翼云科技有限公司 Data migration method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547818A (en) * 2012-01-04 2012-07-04 大唐移动通信设备有限公司 Resource identifier allocating method and equipment
CN105743956A (en) * 2014-12-12 2016-07-06 阿里巴巴集团控股有限公司 Data resource allocation method and device
CN106952085A (en) * 2016-01-06 2017-07-14 阿里巴巴集团控股有限公司 A kind of method and device of data storage and Business Processing
CN109784963A (en) * 2017-11-14 2019-05-21 阿里巴巴集团控股有限公司 A kind of resource management system, method, server and computer storage medium
CN111190910A (en) * 2019-07-11 2020-05-22 腾讯科技(深圳)有限公司 Quota resource processing method and device, electronic equipment and readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8332467B2 (en) * 2009-07-29 2012-12-11 International Business Machines Corporation Lightweight RRD extension framework
CN104639594A (en) * 2013-11-15 2015-05-20 中国电信股份有限公司 System and method for allocating physical resources and virtual resources

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547818A (en) * 2012-01-04 2012-07-04 大唐移动通信设备有限公司 Resource identifier allocating method and equipment
CN105743956A (en) * 2014-12-12 2016-07-06 阿里巴巴集团控股有限公司 Data resource allocation method and device
CN106952085A (en) * 2016-01-06 2017-07-14 阿里巴巴集团控股有限公司 A kind of method and device of data storage and Business Processing
CN109784963A (en) * 2017-11-14 2019-05-21 阿里巴巴集团控股有限公司 A kind of resource management system, method, server and computer storage medium
CN111190910A (en) * 2019-07-11 2020-05-22 腾讯科技(深圳)有限公司 Quota resource processing method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN112669160A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN104937584B (en) Based on the quality of shared resource to the service quality of virtual machine and application program offer optimization through priority ranking
US8108352B1 (en) Data store replication for entity based partition
US20200092084A1 (en) System and methods for operating a blockchain network
CN107993151B (en) Fund transaction clearing method, device, equipment and computer readable storage medium
KR101959153B1 (en) System for efficient processing of transaction requests related to an account in a database
JP2019200580A (en) Decentralized ledger system, decentralized ledger subsystem, and decentralized ledger node
US20110066591A1 (en) Policy-based storage structure distribution
CN108270581A (en) Shared resource charge processing method and device
CN110909978A (en) Resource processing method, device, server and computer readable storage medium
CN106952085B (en) Method and device for data storage and service processing
CN112669160B (en) Data processing method and device, electronic equipment and storage medium
CN115712660B (en) Data storage method, device, server and storage medium
CN107276914B (en) Self-service resource allocation scheduling method based on CMDB
WO2020259191A1 (en) Data centre node allocation method, apparatus, and system and computer device
CN117522540A (en) Distributed electronic bill management system based on bank
CN111708808A (en) Distributed service system and service summarizing and inquiring method, device and equipment thereof
JP2019149185A (en) Asset inventory system and computer-implemented method of performing electronic collateralization search
CN114244905B (en) Data forwarding method, device, computer equipment and storage medium
CN113032036B (en) Service data processing method, device, system, computer equipment and storage medium
CN113312359A (en) Distributed job progress calculation method and device and storage medium
CN112948078A (en) Revenue allocation task processing method and device based on service call
CN110175179A (en) Data transmission method and system, service node, storage device
CN115686869B (en) Resource processing method, system, electronic device and storage medium
WO2024011917A1 (en) Delegate model for blockchain transactions
CN106649565B (en) A kind of on-line analytical processing method

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