Service processing method and related device
By dividing the business groups to be processed according to regions and user IDs and evenly assigning them to processing nodes, the problem of uneven node processing resources in the banking system is solved, and business processing efficiency and system stability are improved.
Patent Information
- Application Number
- CN202410236518.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the banking system cannot make the processing resource usage of each node consistent when processing business, resulting in a waste of resources on some nodes, and excessive processing pressure on other nodes, resulting in slow business processing.
By obtaining the business set to be processed and determining the business group to be processed based on the region ID and user ID, calculating the average number of business groups based on the ratio of the number of business groups and the number of processing nodes, allocating the business group to be processed to the processing nodes to ensure that each node handles the business in a balanced manner amount, and set a threshold when allocating to avoid overloading the last node.
It achieves a balanced business volume of each processing node, avoids waste of resources and uneven processing pressure, and improves business processing efficiency and system stability.
Smart Images

Figure CN118626244A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a task processing method and related devices. Background Art
[0002] As the economy continues to develop, the banking system is providing more and more types of services, and people's willingness to conduct business through banks is also increasing.
[0003] In order to handle a large amount of business volume, in the related art, distributed nodes can be used to process the business volume in multiple lines. In the related art, groups are usually formed according to customer numbers, and one distributed node is responsible for processing customer business requests of one group.
[0004] However, in the related art, it is impossible to ensure that each processing node has a relatively consistent processing capacity, which results in too low utilization of processing resources of some nodes, causing resource waste, and too much processing pressure on other nodes, resulting in slow business processing. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a business processing method, which can ensure that each processing node performs business processing in a balanced manner.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] In a first aspect, an embodiment of the present application discloses a service processing method, the method comprising:
[0008] Acquire a set of pending services, wherein the set of pending services has corresponding area identifiers and user identifiers, wherein the area identifier is used to identify the area where the pending services are applied for, and the user identifier is used to identify the user who applied for the services;
[0009] Determine multiple pending service groups according to the service generation area and the user identifier, wherein the target pending service group includes pending services applied for by users corresponding to the target user identifier in the target area, and the multiple pending service groups respectively correspond to the same number of target user identifiers;
[0010] Determine the average number of service groups to be processed according to the ratio of the number of service groups to be processed to the number of processing nodes corresponding to the plurality of processing nodes, and the processing nodes are used to process the services to be processed;
[0011] The multiple business groups to be processed are allocated to the multiple processing nodes, and based on the number of business groups to be processed allocated to the target processing node reaching a first quantity threshold, the business groups to be processed are allocated to the next processing node, and the first quantity threshold exceeds the average number of business groups to be processed by an amount less than a second quantity threshold.
[0012] In a possible implementation, the user identifier is the last N digits of the user code, and the user code corresponds to the user one-to-one.
[0013] In a possible implementation, the target to-be-processed service group includes the target user identifier and a target area identifier corresponding to the target area, and the target to-be-processed service group is used to instruct a processing node to update user data of a user corresponding to the target user identifier in the target area.
[0014] In a possible implementation manner, allocating the multiple to-be-processed service groups to the multiple processing nodes includes:
[0015] Determine M to-be-processed service groups among the plurality of to-be-processed service groups allocated to the target processing node;
[0016] Generate business processing information corresponding to the M business groups to be processed according to the user identifiers and area identifiers respectively included in the M business groups to be processed, wherein the amount of information included in the business processing information is less than the sum of the amount of information of the user identifiers and area identifiers respectively included in the M business groups to be processed;
[0017] The service processing information is sent to the target processing node, where the service processing information is used to instruct the target processing node to process the M to-be-processed service groups.
[0018] In a possible implementation, generating the service processing information corresponding to the M service groups to be processed according to the user identifiers and area identifiers respectively included in the M service groups to be processed includes:
[0019] Determine N to-be-processed service groups having the same corresponding area identifier among the M to-be-processed service groups;
[0020] According to the common area identifier corresponding to the N business groups to be processed and the user identifiers respectively corresponding to the N business groups to be processed, target information corresponding to the N business groups to be processed in the business processing information is generated, and the target information includes 1 of the common area identifiers and the user identifiers respectively corresponding to the N business groups to be processed.
[0021] In a possible implementation manner, the multiple service groups to be processed correspond to multiple area identifiers, and the step of allocating the multiple service groups to be processed to the multiple processing nodes includes:
[0022] Based on the completion of the allocation of the to-be-processed service group corresponding to the first area identifier, the to-be-processed service group corresponding to the second area identifier is allocated, and the first area identifier and the second area identifier are any area identifiers among the multiple area identifiers.
[0023] In a second aspect, an embodiment of the present application discloses a service processing device, the device comprising an acquisition unit, a first determination unit, a second determination unit and an allocation unit:
[0024] The acquisition unit is used to acquire a set of pending services, wherein the set of pending services has corresponding area identifiers and user identifiers, wherein the area identifier is used to identify the area where the pending services are applied for, and the user identifier is used to identify the user who applied for the services;
[0025] The first determination unit is used to determine a plurality of to-be-processed service groups according to the service generation area and the user identifier, wherein the target to-be-processed service group includes the to-be-processed services applied for by the user corresponding to the target user identifier in the target area, and the plurality of to-be-processed service groups respectively correspond to the same number of target user identifiers;
[0026] The second determining unit is used to determine the average number of service groups to be processed according to the ratio of the number of service groups to be processed to the number of processing nodes corresponding to the plurality of processing nodes, and the processing nodes are used to process the services to be processed;
[0027] The allocation unit is used to allocate the multiple pending business groups to the multiple processing nodes, and allocate the pending business groups to the next processing node based on the number of pending business groups allocated to the target processing node reaching a first quantity threshold, and the excess amount of the first quantity threshold exceeding the average number of pending business groups is less than a second quantity threshold.
[0028] In a possible implementation, the user identifier is the last N digits of the user code, and the user code corresponds to the user one-to-one.
[0029] In a possible implementation, the target to-be-processed service group includes the target user identifier and a target area identifier corresponding to the target area, and the target to-be-processed service group is used to instruct a processing node to update user data of a user corresponding to the target user identifier in the target area.
[0030] In a possible implementation manner, the allocation unit is specifically configured to:
[0031] Determine M to-be-processed service groups among the plurality of to-be-processed service groups allocated to the target processing node;
[0032] Generate business processing information corresponding to the M business groups to be processed according to the user identifiers and area identifiers respectively included in the M business groups to be processed, wherein the amount of information included in the business processing information is less than the sum of the amount of information of the user identifiers and area identifiers respectively included in the M business groups to be processed;
[0033] The service processing information is sent to the target processing node, where the service processing information is used to instruct the target processing node to process the M to-be-processed service groups.
[0034] In a possible implementation manner, the allocation unit is specifically configured to:
[0035] Determine N to-be-processed service groups having the same corresponding area identifier among the M to-be-processed service groups;
[0036] According to the common area identifier corresponding to the N business groups to be processed and the user identifiers respectively corresponding to the N business groups to be processed, target information corresponding to the N business groups to be processed in the business processing information is generated, and the target information includes 1 of the common area identifiers and the user identifiers respectively corresponding to the N business groups to be processed.
[0037] In a possible implementation manner, the multiple to-be-processed service groups correspond to multiple area identifiers, and the allocation unit is specifically configured to:
[0038] Based on the completion of the allocation of the to-be-processed service group corresponding to the first area identifier, the to-be-processed service group corresponding to the second area identifier is allocated, and the first area identifier and the second area identifier are any area identifiers among the multiple area identifiers.
[0039] In a third aspect, an embodiment of the present application discloses a computer device, wherein the computer device includes a processor and a memory:
[0040] The memory is used to store a computer program and transmit the computer program to the processor;
[0041] The processor is used to execute the service processing method according to any one of the instructions in the computer program;
[0042] In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the business processing method described in any one of the first aspects;
[0043] In a fifth aspect, an embodiment of the present application discloses a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the business processing method described in any one of the first aspects.
[0044] It can be seen from the above technical scheme that when the present application performs business processing, it can first obtain a set of pending businesses, and the pending business set has corresponding regional identifiers and user identifiers. The regional identifier is used to identify the region where the pending business is applied for, and the user identifier is used to identify the user who applies for the business. Then, according to the business generation region and user identifier, multiple pending business groups can be determined. The target pending business group includes the pending business applied for by the user corresponding to the target user identifier in the target region. The number of target user identifiers corresponding to the multiple pending business groups is the same. A pending business group is the set of all pending businesses corresponding to a user number in a region. According to the ratio of the number of pending business groups and the number of processing nodes corresponding to multiple processing nodes, the average number of pending business groups can be determined. The processing nodes are used to process pending businesses. The average number of pending business groups is the amount of business that each processing node needs to process after the total business volume is evenly distributed to each node. Based on this, the computer device can allocate multiple pending business groups to multiple processing nodes, and allocate pending business groups to the next processing node based on the number of pending business groups allocated to the target processing node reaching a first quantity threshold. The first quantity threshold exceeds the average number of pending business groups by a quantity that is less than a second quantity threshold, thereby ensuring that the last processing node does not receive too much pending business, thereby ensuring that each node can eventually obtain a balanced business processing volume. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flowchart of a business processing method provided in an embodiment of the present application;
[0047] Figure 2 A structural block diagram of a service processing device provided in an embodiment of the present application;
[0048] Figure 3 A structural diagram of a terminal provided in an embodiment of the present application;
[0049] Figure 4 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0051] It is understandable that the method can be applied to a computer device, which is a computer device capable of performing business processing, such as a terminal device or a server. The method can be executed independently by a terminal device or a server, or it can be applied to a network scenario in which a terminal device and a server communicate, and is executed in cooperation with a terminal device and a server. Among them, the terminal device can be a mobile phone, a tablet computer, a laptop computer, a desktop computer and other devices. The terminal device can also include a variety of virtual reality devices, such as augmented reality (AR) devices, such as AR glasses, AR screens and other devices, and virtual reality technology (VR) devices, such as head-mounted VR glasses and other devices. The server can be understood as an application server, or a Web server. In actual deployment, the server can be an independent server, a cluster server, or a cloud server.
[0052] Next, the business processing method provided by this application will be introduced in detail with reference to the accompanying drawings.
[0053] See also Figure 1 , Figure 1 A flowchart of a service processing method provided in an embodiment of the present application, the method comprising:
[0054] S101: Obtain a set of services to be processed.
[0055] The pending service set has corresponding area identifiers and user identifiers. The area identifier is used to identify the area where the pending service is applied for, and the user identifier is used to identify the user who applies for the service.
[0056] S102: Determine a plurality of to-be-processed service groups according to the service generation area and the user identifier.
[0057] Among them, the target pending business group includes pending businesses applied for by users corresponding to the target user identifiers in the target area. The target pending business group can be any one of multiple pending business groups, and the number of target user identifiers corresponding to the multiple pending business groups is consistent. That is, the business volume of each pending business group is relatively consistent, and one pending business group corresponds to only one area, that is, one area identifier corresponds to only one area; one pending business group can include pending businesses of multiple users, that is, one user identifier can identify multiple users or one user, which is not limited here.
[0058] S103: Determine an average number of service groups to be processed according to a ratio of the number of service groups to be processed to the number of processing nodes corresponding to the plurality of processing nodes.
[0059] The processing node is used to process pending services, and the average number of pending service groups is the amount of pending services that each processing node needs to process at least when multiple processing nodes process the pending service sets in a balanced manner.
[0060] S104: Allocate multiple to-be-processed service groups to multiple processing nodes.
[0061] During allocation, based on the number of pending service groups allocated to the target processing node reaching the first quantity threshold, the pending service group is allocated to the next processing node, and the first quantity threshold exceeds the average number of pending service groups by an amount less than the second quantity threshold. That is, the first quantity threshold is slightly greater than the average number of pending service groups, so that when services are allocated based on the first quantity threshold, the total amount of allocable services corresponding to the multiple processing nodes can be greater than the amount of services in the pending service set, thereby avoiding the situation where services cannot be processed.
[0062] It can be seen from the above technical scheme that when the present application performs business processing, it can first obtain a set of pending businesses, and the pending business set has corresponding regional identifiers and user identifiers. The regional identifier is used to identify the region where the pending business is applied for, and the user identifier is used to identify the user who applies for the business. Then, according to the business generation region and user identifier, multiple pending business groups can be determined. The target pending business group includes the pending business applied for by the user corresponding to the target user identifier in the target region. The number of target user identifiers corresponding to the multiple pending business groups is the same. A pending business group is the set of all pending businesses corresponding to a user number in a region. According to the ratio of the number of pending business groups and the number of processing nodes corresponding to multiple processing nodes, the average number of pending business groups can be determined. The processing nodes are used to process pending businesses. The average number of pending business groups is the amount of business that each processing node needs to process after the total business volume is evenly distributed to each node. Based on this, the computer device can allocate multiple pending business groups to multiple processing nodes, and allocate pending business groups to the next processing node based on the number of pending business groups allocated to the target processing node reaching a first quantity threshold. The first quantity threshold exceeds the average number of pending business groups by a quantity that is less than a second quantity threshold, thereby ensuring that the last processing node does not receive too much pending business, thereby ensuring that each node can eventually obtain a balanced business processing volume.
[0063] In a possible implementation, the user identifier is the last N digits of the user code, and the user code corresponds to the user one-to-one. Since the user codes of multiple users may have the same last N digits, one user identifier can correspond to multiple users.
[0064] In a possible implementation, the target to-be-processed service group includes the target user identifier and a target area identifier corresponding to the target area, and the target to-be-processed service group is used to instruct a processing node to update user data of a user corresponding to the target user identifier in the target area.
[0065] In one possible implementation, in order to reduce the amount of information required to be transmitted for allocating services, when allocating the multiple to-be-processed business groups to the multiple processing nodes, the computer device may first determine M to-be-processed business groups among the multiple to-be-processed business groups allocated to the target processing node, that is, based on a first quantity threshold, first determine the to-be-processed business groups corresponding to the multiple to-be-processed business groups respectively.
[0066] Then, the computer device can generate business processing information corresponding to the M business groups to be processed based on the user identifiers and area identifiers respectively included in the M business groups to be processed, and the amount of information included in the business processing information is less than the sum of the amount of information of the user identifiers and area identifiers respectively included in the M business groups to be processed, that is, the business processing information is compressed information.
[0067] The computer device can send the business processing information to the target processing node, and the business processing information is used to instruct the target processing node to process the M groups of pending businesses. Thus, the processing node can smoothly execute the pending businesses that need to be executed by receiving less information, thereby reducing the amount of information transmission required for the business processing process and further improving the business processing efficiency.
[0068] Specifically, in a possible implementation, when generating business processing information corresponding to the M business groups to be processed according to the user identifiers and area identifiers respectively included in the M business groups to be processed, the computer device can determine N business groups to be processed that have the same corresponding area identifiers among the M business groups to be processed, and then generate target information corresponding to the N business groups to be processed in the business processing information according to the common area identifier corresponding to the N business groups to be processed and the user identifiers respectively corresponding to the N business groups to be processed, wherein the target information includes 1 common area identifier and the user identifiers respectively corresponding to the N business groups to be processed, so that the target processing node can process multiple businesses to be processed with only the target information.
[0069] In addition, in a possible implementation, the multiple pending business groups correspond to multiple regional identifiers. In order to place the pending businesses in the same region into the same processing node for processing as much as possible, thereby avoiding the problem that the same processing node needs to interact with servers in multiple regions when processing businesses, resulting in a large amount of time consumption, when the computer device allocates the multiple pending business groups to the multiple processing nodes, the pending business group corresponding to the second regional identifier is allocated based on the allocation of the pending business group corresponding to the first regional identifier. The first regional identifier and the second regional identifier are any regional identifiers among the multiple regional identifiers.
[0070] Next, the business processing method provided by this application will be introduced in combination with an actual application scenario.
[0071] In this actual application scenario, the user code is the customer number, and the customer number is issued sequentially, so the distribution of the last k (k>0) bits of the customer number is even, and the user identifier is the last k bits of the customer number.
[0072] 2. The last digits of the customer number have no correlation with the region number, which is the region identifier.
[0073] 3. Because customer information is stored by regional organization number, customers in the same region belong to the same database node.
[0074] This solution includes data statistics processing, node data allocation, node data compression storage, and batch scheduler data processing. Each part is described as follows:
[0075] 1. Data statistical processing:
[0076] 1. Data definition and preparation:
[0077] (1) Filter out customer data that needs to be processed according to requirements;
[0078] (2) Customer data is divided into m (m>0) units according to the region P (Province), namely: P1, P2, P3...Pm;
[0079] (3) Take the last k (k>0) digits C(Client) of the client number and sort them from small to large. There are n=10^k digits in total, namely: C1=00...00, C2=00...01, ..., Cn=99...99;
[0080] (4) There are a total of w (w>0) sub-nodes B (BatchJob) in this batch scheduler, namely: B1, B2, ..., Bw.
[0081] 2. Perform a Cartesian product combination of the regional institutions and the last digits of customers to obtain P×C = {P1C1, P1C2, ……, P1Cn, P2C1, P2C2, ……, P2Cn, ……, PmC1, PmC2, ……, PmCn}.
[0082] 3. Count the amount of data to be processed for each combination to obtain S1,1, S1,2, ……, Sm,n.
[0083] 4. Calculate the total amount of customer data SUM = S1,1 + S1,2 + …… + Sm,n.
[0084] 5. Calculate the expected average amount of data to be processed for each node and round up to obtain AVG = Ceiling(SUM / w).
[0085] II. Node Data Allocation
[0086] 1. Process the child nodes in order from Bz to Bw.
[0087] 2. When starting the allocation, the amount of data to be processed by the B1 child node is BS1 = 0. In the order of P first and then C, starting from P1C1, accumulate S1,1 to BS1, then S1,2, until when reaching Sx,y, BS1 > AVG for the first time. At this time, record the institution-customer data of the current processed institutions and the last digits of customers from P1C1 to PxCy. Switch to B2, and for BS2, start from PxC(y + 1) (or P(x + 1)C1), and continue to accumulate in the above manner until all PmCn are processed.
[0088] 3. Because BSw > AVG, it is possible that when switching to Bz (z < w), all PmCn have been processed, but it will not happen that Bw has been switched but PmCn has not been processed yet, which can ensure that any customer data is allocated to one of the child nodes.
[0089] III. Node Data Compression and Storage
[0090] 1. For the data PaCb to PxCy (1 ≤ a ≤ x ≤ m, 1 ≤ b, y ≤ n) that needs to be processed by any child node, perform text compression processing. The regional institutions P are separated by the vertical line "|", and the last digits of customers C are separated by the dash "-". The data recording results RES in each case are as follows:
[0091] When a = x, b = 1, and y = n, the recording result is: Pa
[0092] When a = x, b ≠ y, and b > 1, the recording result is: Pa Cb-Cy
[0093] When a = x, b ≠ y, and y < n, the recording result is: Pa Cb-Cy
[0094] When a = x and b = y, the recorded result is: Pa Cb
[0095] When a ≠ x, b = 1, and y = n, the recorded result is: Pa|P(a + 1)|P(a + 2)|…|Px
[0096] When a ≠ x, b > 1, and y = n, the recorded result is: PaCb - Cn|P(a + 1)|P(a + 2)|…|Px
[0097] When a ≠ x, b = n, and y = n, the recorded result is: PaCn|P(a + 1)|P(a + 2)|…|Px
[0098] When a ≠ x, b = 1, and y < n, the recorded result is: Pa|P(a + 1)|P(a + 2)|…|PxC1 - Cy
[0099] When a ≠ x, b = 1, and y = 1, the recorded result is: Pa|P(a + 1)|P(a + 2)|…|PxC1
[0100] When a ≠ x, 1 < b, y < n, the recorded result is: PaCb - Cn|P(a + 1)|P(a + 2)|…|PxC1 - Cy
[0101] When a ≠ x, b = n, and 1 < y < n, the recorded result is: PaCn|P(a + 1)|P(a + 2)|…|PxC1 - Cy
[0102] When a ≠ x, 1 < b < n, and y = 1, the recorded result is: PaCb - Cn|P(a + 1)|P(a + 2)|…|PxC1
[0103] When a ≠ x, b = n, and y = 1, the recorded result is: PaCn|P(a + 1)|P(a + 2)|…|PxC1
[0104] 2. After the calculation is completed, store the storage node Bz (1 ≤ z ≤ w) and the corresponding recorded result RESz.
[0105] IV. Data Processing of the Batch Scheduling Program
[0106] The w child nodes of the batch scheduling program read the content of RESz (1 ≤ z ≤ w) according to their own node numbers. After the reading is completed, it is split according to the reading result, and then the corresponding customer data is processed.
[0107] The disassembly process is as follows:
[0108] 1. If the recorded result contains multiple regional institutions P, it is first split according to the vertical line "|".
[0109] 2. Process the data of customer tail number C in each regional institution P in sequence
[0110] (1) If the result is Pa (1 ≤ a ≤ m), process all customer data within regional institution Pa
[0111] (2) If the result is Pa Cb - Cy (1 ≤ a ≤ m, 1 ≤ b < y ≤ n), process the customer data with customer tail numbers from Cb to Cy within regional institution Pa
[0112] (3) If the result is Pa Cb (1 ≤ a ≤ m, 1 ≤ b ≤ n), process the customer data with customer tail number equal to Cb within regional institution Pa
[0113] 3. Since all data in a regional institution is stored in a database node, the data processing under a regional institution is divided into one (or multiple) database transactions for processing and submission (the number of transactions is determined by the number of submissions that the database can withstand at one time), so as to generate only single - database transactions and not generate distributed transactions. If processing the data of the next regional institution, a new database transaction is created
[0114] Based on the service processing method provided in the above - mentioned embodiments, the present application also provides a service processing device. Refer to Figure 2 , Figure 2 which is the structural block diagram of a service processing device provided in an embodiment of the present application. The device includes an acquisition unit 201, a first determination unit 202, a second determination unit 203, and an allocation unit 204
[0115] The acquisition unit 201 is used to acquire a set of services to be processed. The set of services to be processed has corresponding area identifiers and user identifiers. The area identifier is used to identify the area where the service to be processed is applied, and the user identifier is used to identify the user who applies for the service
[0116] The first determination unit 202 is used to determine multiple groups of services to be processed according to the service generation area and the user identifier. The target group of services to be processed includes the services to be processed applied by the user corresponding to the target user identifier in the target area, and the number of target user identifiers corresponding to the multiple groups of services to be processed is the same
[0117] The second determination unit 203 is used to determine the average number of groups of services to be processed according to the ratio of the number of groups of services to be processed and the number of processing nodes corresponding to multiple processing nodes. The processing nodes are used to process the services to be processed
[0118] The allocation unit 204 is used to allocate the multiple pending business groups to the multiple processing nodes, and allocate the pending business groups to the next processing node based on the number of pending business groups allocated to the target processing node reaching a first quantity threshold, and the first quantity threshold exceeds the average number of pending business groups by an amount less than a second quantity threshold.
[0119] In a possible implementation, the user identifier is the last N digits of the user code, and the user code corresponds to the user one-to-one.
[0120] In a possible implementation, the target to-be-processed service group includes the target user identifier and a target area identifier corresponding to the target area, and the target to-be-processed service group is used to instruct a processing node to update user data of a user corresponding to the target user identifier in the target area.
[0121] In a possible implementation, the allocating unit 204 is specifically configured to:
[0122] Determine M to-be-processed service groups among the plurality of to-be-processed service groups allocated to the target processing node;
[0123] Generate business processing information corresponding to the M business groups to be processed according to the user identifiers and area identifiers respectively included in the M business groups to be processed, wherein the amount of information included in the business processing information is less than the sum of the amount of information of the user identifiers and area identifiers respectively included in the M business groups to be processed;
[0124] The service processing information is sent to the target processing node, where the service processing information is used to instruct the target processing node to process the M to-be-processed service groups.
[0125] In a possible implementation, the allocating unit 204 is specifically configured to:
[0126] Determine N to-be-processed service groups having the same corresponding area identifier among the M to-be-processed service groups;
[0127] According to the common area identifier corresponding to the N business groups to be processed and the user identifiers respectively corresponding to the N business groups to be processed, target information corresponding to the N business groups to be processed in the business processing information is generated, and the target information includes 1 of the common area identifiers and the user identifiers respectively corresponding to the N business groups to be processed.
[0128] In a possible implementation, the multiple to-be-processed service groups correspond to multiple area identifiers, and the allocating unit 204 is specifically configured to:
[0129] Based on the completion of the allocation of the to-be-processed service group corresponding to the first area identifier, the to-be-processed service group corresponding to the second area identifier is allocated, and the first area identifier and the second area identifier are any area identifiers among the multiple area identifiers.
[0130] The present application also provides a computer device, see Figure 3 As shown, the computer device may be a terminal device, and a mobile phone is taken as an example:
[0131] Figure 3 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Figure 3 The mobile phone includes: a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, a processor 780, and a power supply 790. Those skilled in the art will understand that Figure 3 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0132] Combine the following Figure 3 A detailed introduction to the various components of the mobile phone:
[0133] The RF circuit 710 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 780 for processing; in addition, the designed uplink data is sent to the base station. Usually, the RF circuit 710 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, referred to as LNA), a duplexer, etc. In addition, the RF circuit 710 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0134] The memory 720 can be used to store software programs and modules. The processor 780 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 720. The memory 720 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 720 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0135] The input unit 730 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 731 or near the touch panel 731 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 731 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch panel 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0136] The display unit 740 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 may include a display panel 741. Optionally, the display panel 741 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), etc. Further, the touch panel 731 may cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of touch event. Subsequently, the processor 780 provides a corresponding visual output on the display panel 741 according to the type of touch event. Although in Figure 3 In the embodiment, the touch panel 731 and the display panel 741 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone.
[0137] The mobile phone may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 741 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0138] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the mobile phone. The audio circuit 760 can transmit the received audio data to the speaker 761 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another mobile phone through the RF circuit 710, or the audio data is output to the memory 720 for further processing.
[0139] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 770. It provides users with wireless broadband Internet access. Figure 3 A WiFi module 770 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0140] The processor 780 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the mobile phone and processes data, thereby performing overall detection of the mobile phone. Optionally, the processor 780 may include one or more processing units; preferably, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 780.
[0141] The mobile phone also includes a power supply 790 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0142] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0143] In this embodiment, the processor 780 included in the terminal device also has the following functions:
[0144] Acquire a set of pending services, wherein the set of pending services has corresponding area identifiers and user identifiers, wherein the area identifier is used to identify the area where the pending services are applied for, and the user identifier is used to identify the user who applied for the services;
[0145] Determine multiple pending service groups according to the service generation area and the user identifier, wherein the target pending service group includes pending services applied for by users corresponding to the target user identifier in the target area, and the multiple pending service groups respectively correspond to the same number of target user identifiers;
[0146] Determine the average number of service groups to be processed according to the ratio of the number of service groups to be processed to the number of processing nodes corresponding to the plurality of processing nodes, and the processing nodes are used to process the services to be processed;
[0147] The multiple business groups to be processed are allocated to the multiple processing nodes, and based on the number of business groups to be processed allocated to the target processing node reaching a first quantity threshold, the business groups to be processed are allocated to the next processing node, and the first quantity threshold exceeds the average number of business groups to be processed by an amount less than a second quantity threshold.
[0148] The present application also provides a server. Figure 4 As shown, Figure 4 The structural diagram of the server 800 provided in the embodiment of the present application, the server 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 822 (for example, one or more processors) and a memory 832, and one or more storage media 830 (for example, one or more mass storage devices) storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 can be temporary storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 822 can be configured to communicate with the storage medium 830 and execute a series of instruction operations in the storage medium 830 on the server 800.
[0149] The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858, and / or one or more operating systems 841, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0150] The steps performed by the server in the above embodiment can be based on Figure 4 The server structure shown.
[0151] The embodiment of the present application also provides a computer-readable storage medium for storing a computer program, wherein the computer program is used to execute any one of the implementation modes of the business processing methods described in the aforementioned embodiments.
[0152] An embodiment of the present application further provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the service processing method described in any one of the above embodiments.
[0153] It is understandable that in the specific implementation of the present application, related data such as user information (such as user identification) is involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0154] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: read-only memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0155] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0156] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A business processing method, characterized in that: The method comprises: Acquire a set of pending services, wherein the set of pending services has corresponding area identifiers and user identifiers, wherein the area identifier is used to identify the area where the pending services are applied for, and the user identifier is used to identify the user who applied for the services; Determine multiple pending service groups according to the service generation area and the user identifier, wherein the target pending service group includes pending services applied for by users corresponding to the target user identifier in the target area, and the multiple pending service groups respectively correspond to the same number of target user identifiers; Determine the average number of service groups to be processed according to the ratio of the number of service groups to be processed to the number of processing nodes corresponding to the plurality of processing nodes, and the processing nodes are used to process the services to be processed; The multiple business groups to be processed are allocated to the multiple processing nodes, and based on the number of business groups to be processed allocated to the target processing node reaching a first quantity threshold, the business groups to be processed are allocated to the next processing node, and the first quantity threshold exceeds the average number of business groups to be processed by an amount less than a second quantity threshold.
2. The method according to claim 1, characterized in that The user identifier is the last N digits of the user code, and the user code corresponds to the user one by one.
3. The method according to claim 1, characterized in that The target to-be-processed service group includes the target user identifier and a target area identifier corresponding to the target area, and the target to-be-processed service group is used to instruct a processing node to update user data of a user corresponding to the target user identifier in the target area.
4. The method according to claim 3, characterized in that The allocating the multiple to-be-processed service groups to the multiple processing nodes comprises: Determine M to-be-processed service groups among the plurality of to-be-processed service groups allocated to the target processing node; Generate business processing information corresponding to the M business groups to be processed according to the user identifiers and area identifiers respectively included in the M business groups to be processed, wherein the amount of information included in the business processing information is less than the sum of the amount of information of the user identifiers and area identifiers respectively included in the M business groups to be processed; The service processing information is sent to the target processing node, where the service processing information is used to instruct the target processing node to process the M to-be-processed service groups.
5. The method according to claim 4, characterized in that The generating of the service processing information corresponding to the M service groups to be processed according to the user identifiers and the area identifiers respectively included in the M service groups to be processed includes: Determine N to-be-processed service groups having the same corresponding area identifier among the M to-be-processed service groups; According to the common area identifier corresponding to the N business groups to be processed and the user identifiers respectively corresponding to the N business groups to be processed, target information corresponding to the N business groups to be processed in the business processing information is generated, and the target information includes 1 of the common area identifiers and the user identifiers respectively corresponding to the N business groups to be processed.
6. The method according to claim 1, characterized in that The multiple service groups to be processed correspond to multiple area identifiers, and the allocating the multiple service groups to be processed to the multiple processing nodes includes: Based on the completion of the allocation of the to-be-processed service group corresponding to the first area identifier, the to-be-processed service group corresponding to the second area identifier is allocated, and the first area identifier and the second area identifier are any area identifiers among the multiple area identifiers.
7. A service processing device, characterized in that: The device comprises an acquisition unit, a first determination unit, a second determination unit and an allocation unit: The acquisition unit is used to acquire a set of pending services, wherein the set of pending services has corresponding area identifiers and user identifiers, wherein the area identifier is used to identify the area where the pending services are applied for, and the user identifier is used to identify the user who applied for the services; The first determination unit is used to determine a plurality of to-be-processed service groups according to the service generation area and the user identifier, wherein the target to-be-processed service group includes the to-be-processed services applied for by the user corresponding to the target user identifier in the target area, and the plurality of to-be-processed service groups respectively correspond to the same number of target user identifiers; The second determining unit is used to determine the average number of service groups to be processed according to the ratio of the number of service groups to be processed to the number of processing nodes corresponding to the plurality of processing nodes, and the processing nodes are used to process the services to be processed; The allocation unit is used to allocate the multiple pending business groups to the multiple processing nodes, and allocate the pending business groups to the next processing node based on the number of pending business groups allocated to the target processing node reaching a first quantity threshold, and the excess amount of the first quantity threshold exceeding the average number of pending business groups is less than a second quantity threshold.
8. The device according to claim 7, characterized in that The user identifier is the last N digits of the user code, and the user code corresponds to the user one by one.
9. The device according to claim 7, characterized in that The target to-be-processed service group includes the target user identifier and a target area identifier corresponding to the target area, and the target to-be-processed service group is used to instruct a processing node to update user data of a user corresponding to the target user identifier in the target area.
10. The device according to claim 9, characterized in that The allocation unit is specifically used for: Determine M to-be-processed service groups among the plurality of to-be-processed service groups allocated to the target processing node; Generate business processing information corresponding to the M business groups to be processed according to the user identifiers and area identifiers respectively included in the M business groups to be processed, wherein the amount of information included in the business processing information is less than the sum of the amount of information of the user identifiers and area identifiers respectively included in the M business groups to be processed; The service processing information is sent to the target processing node, where the service processing information is used to instruct the target processing node to process the M to-be-processed service groups.
11. The device according to claim 10, characterized in that The allocation unit is specifically used for: Determine N to-be-processed service groups having the same corresponding area identifier among the M to-be-processed service groups; According to the common area identifier corresponding to the N business groups to be processed and the user identifiers respectively corresponding to the N business groups to be processed, target information corresponding to the N business groups to be processed in the business processing information is generated, and the target information includes 1 of the common area identifiers and the user identifiers respectively corresponding to the N business groups to be processed.
12. The device according to claim 7, characterized in that The multiple service groups to be processed correspond to multiple area identifiers, and the allocation unit is specifically used to: Based on the completion of the allocation of the to-be-processed service group corresponding to the first area identifier, the to-be-processed service group corresponding to the second area identifier is allocated, and the first area identifier and the second area identifier are any area identifiers among the multiple area identifiers.
13. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute the business processing method according to any one of claims 1 to 6 according to the instructions in the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the business processing method according to any one of claims 1 to 6.
15. A computer program product comprising a computer program, which, when executed on a computer device, enables the computer device to execute the service processing method according to any one of claims 1 to 6.
