Multi-user multi-batch computing and storage processing method and system based on weight distribution

By using a weight allocation mechanism triggered by active users, the problems of wasted computing resources and high storage pressure in traditional systems are solved, achieving efficient resource utilization and improved user experience.

CN115098251BActive Publication Date: 2025-12-09DEJIE (SHENZHEN) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210679044.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2025-12-09
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

Traditional weight allocation calculation systems suffer from problems such as excessive server load, computational congestion, low resource utilization efficiency, high storage access pressure, and waste of computing resources in multi-user, multi-batch scenarios.

Method used

A trigger-based calculation mechanism based on active users is adopted. Data items of active users are decoupled through message queues, weight allocation calculation is performed, and calculation and storage are performed sequentially according to the trigger order of active users, transforming it into a calculation execution order of 'one user, multiple batches'.

Benefits of technology

It reduced the computational concurrency, alleviated server load and database congestion, improved resource utilization efficiency and user experience, and achieved an efficient match between business needs and computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115098251B_ABST
    Figure CN115098251B_ABST
Patent Text Reader

Abstract

The application provides a multi-user multi-batch computing and storage processing method and system based on weight distribution, which comprises the following steps: when receiving an access request or a query request of a client, marking the client as the latest active user, and decoupling the active user id, user information, batch information and data items under the batch through a message queue to serve as data input; obtaining the active user id from the message queue, and performing weight distribution calculation on the active user; storing the calculated distribution result data to an account table; and updating the user calculation batch id to the latest batch id of the system. The application provides a trigger computing mechanism based on active users, which can change the execution order of the distribution module to "one user with multiple batches" according to the actual needs of the business scene, thereby improving the running efficiency and utilization efficiency of the server computing resources, the execution result update speed and user experience, and reducing the database access pressure.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of big data computing, in particular to a multi-user multi-batch computing and storage processing method based on weight distribution and a system applying the method, which is applicable to big data computing scenarios such as distribution according to work, stock right distribution, prize pool bonus calculation, and pledge airdrop calculation. BACKGROUND

[0002] With the development of big data, multi-user multi-batch computing scenarios involving weight distribution formula, such as distribution according to work, stock right distribution, prize pool bonus calculation, and pledge airdrop calculation, have higher requirements for computing scale, computing frequency, computing execution timeliness, and computing result accuracy. However, in the multi-user multi-batch computing scenario, the traditional weight distribution computing system usually uses the method of "timed task + traversal calculation and storage" for computing and storage processing after decoupling by message queue. The weight distribution formula can be simplified as "distribution result = (numerator / denominator) * multiplier".

[0003] Generally, the timed task is to obtain the user set of a batch of weight distribution calculation, and then to multiply the distribution result of each user obtained by weight calculation according to the contribution (numerator) of each user in the batch and the total contribution (denominator) with the distribution amount (multiplier) of the batch, so as to update and store the data, as shown in the following formula: Figure 1 The multi-batch weight distribution calculation is carried out in batches according to the system-set timed task.

[0004] The data items (numerator, denominator, and multiplier) under the batch of the distribution module can be composed of multiple user contributions (numerator), one total contribution (denominator), and one distribution amount (multiplier), which can be recorded, updated, and input by the business module. The user contribution (numerator) can be input by the business module, or the latest value based on the continuity dynamic update rule can be used as the input, such as user contribution = user contribution + new user contribution. The total contribution (denominator) can be input by the business module, or the latest value based on the continuity dynamic update rule can be used as the input, such as total contribution = ∑ user contribution. The distribution amount (multiplier) can be input by the business module. The contribution refers to the unified weight measurement unit of users in the distribution system, including but not limited to work points, points, scores, rights, and shares.

[0005] However, this computing and storage method is simple and easy to implement, but it also has the following disadvantages:

[0006] 1. Timing task needs to process in batch data set once, which will produce concurrent computing, and when the scale of calculation is large, it is easy to cause server load too high and calculation congestion in the calculation process, the time of calculation completion is uncontrollable, which affects the execution timeliness and user experience;

[0007] 2. In most of the time without computing task, the server is in idle state, and the idle resources are not effectively utilized, resulting in uneven distribution of server resources and low utilization efficiency;

[0008] 3. The storage access pressure caused by one-time large batch calculation of timing task is also large, which is easy to cause database access congestion and affect the execution timeliness and user experience;

[0009] 4. In the user set participating in weight distribution calculation, there are active users and inactive users, that is, not all users will query the distribution result (database access) at the same time, and the calculation of the inactive users who do not query the distribution result at present cannot be efficiently matched with the business demand, which will cause the early consumption and waste of server computing resources. SUMMARY

[0010] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a multi-user multi-batch calculation and storage processing method and system based on weight distribution, which can solve the problems of poor execution timeliness, low resource utilization efficiency, large storage access pressure and consumption and waste of server computing resources in the prior art, and provide a trigger calculation mechanism based on active users, which combines the actual demand of business scene and changes the execution order of the distribution module from "one batch of multiple users" to "one user of multiple batches", so as to improve the running efficiency and utilization efficiency of server computing resources, reduce the database access pressure, and improve the execution result update speed and user experience.

[0011] To solve the above problems, the technical scheme adopted by the present application is as follows:

[0012] The multi-user multi-batch calculation and storage processing method based on weight distribution comprises the following steps: when receiving an access request or a query request of a client, marking the client as the latest active user, and decoupling the active user id, user information, batch information and data items under the batch through a message queue as data input;

[0013] The active user id is obtained from the message queue, and weight distribution calculation is performed on the active user;

[0014] The calculated distribution result data is stored in the account table;

[0015] The user calculation batch id is updated to the latest batch id of the system;

[0016] Wherein, the batch table is generated according to the input batch information and the data items under the batch, it is judged whether the user computing batch id of the active user is the system latest batch id stored in the batch table, and the weight distribution calculation is performed according to the judgment result.

[0017] Further, after obtaining the latest active user id, an account table is generated according to the registered user information, the account table is used to store user id, user computing batch id and user distribution result; wherein, the user computing batch id is the latest batch id that a user has been calculated.

[0018] Further, after obtaining the latest active user id, a batch table is generated according to the input batch information and the data items under the batch, the batch table is used to store batch id, batch-user id and data items under the batch; wherein, the batch id is used as the identification of different batches, and the batch-user id is used as the identification of different users under the batch.

[0019] Further, after determining that the user computing batch id of the active user is the system latest batch id stored in the batch table, all uncalculated batch ids under the batch-user id are searched in the batch table according to the user computing batch id and the system latest batch id, and the weight distribution calculation is performed by traversing the data items under a batch based on the searched batch table, until all batch ids are traversed.

[0020] Further, when multiple users and multiple batches are calculated and stored, the weight distribution calculation is performed according to the trigger order of the active user.

[0021] Further, when receiving user information, the existing privacy data classification set is used to mine the privacy data in the received user information, and the privacy level of the mined privacy data is analyzed in real time, so as to perform privacy classification and privacy protection on the privacy data of the user information.

[0022] Further, when the user registers, the client uses the account to apply for registration to the server;

[0023] The server sends a demand information to the client, which requires to prove that it is an objective existing user, such as providing a picture that needs to be identified by human eye and filling in the identification content;

[0024] The client sends the returned data to the server according to the demand of the returned data after the user fills in the information;

[0025] The server verifies the returned data of the client, and after verification, the account number and the current login time of the client are registered in the smart contract;

[0026] After the user successfully registers, the user can access the relevant smart contract.

[0027] Further, when receiving an access request or a query request from the client, the account of the user is checked by accessing the smart contract to determine whether the user is a currently valid active user.

[0028] The multi-user multi-batch weight distribution-based calculation and storage processing system comprises a client module, a business module and a distribution module.

[0029] The business module executes a business-related program and generates user information, batch information and data items under the batch required for weight distribution calculation.

[0030] The distribution module obtains the active user id from the message queue and performs weight distribution calculation on the active user.

[0031] Further, the distribution module generates an account table according to the user information registered by the business module.

[0032] The distribution module generates a batch table according to the batch information and data items under the batch input by the business module.

[0033] The distribution module determines whether the user calculation batch id is the system latest batch id stored in the batch table according to the latest active user id input by the business module.

[0034] The distribution module searches for all uncalculated batch ids under the batch-user id in the batch table according to the user calculation batch id and the system latest batch id.

[0035] The distribution module stores the calculated distribution result data into the account table.

[0036] The distribution module updates the user calculation batch id to the system latest batch id.

[0037] Therefore, compared with the prior art, the present application has the following advantages:

[0038] 1. This invention replaces the original scheduled task with a triggered task, which distributes the computational workload of each batch from the same time to multiple times, reducing the computational concurrency per unit time and alleviating the situation of excessive server load and computational congestion; at the same time, the computation execution time is shortened, reducing the user query waiting time, and the user perception is close to real-time effect, resulting in a better experience.

[0039] 2. This invention achieves computational load balancing through a task triggering mechanism, resulting in a more balanced distribution of server resources and effectively improving the utilization efficiency of server resources during idle periods in the original solution.

[0040] 3. This invention reduces the amount of computation per unit time of the original solution, while also alleviating database access congestion, thus improving execution efficiency and user experience.

[0041] 4. Based on the active user-triggered computing mechanism, this invention effectively achieves efficient matching between business needs and computing resources, reduces the premature consumption and waste of server resources in the original solution, and improves operating efficiency.

[0042] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0043] Figure 1 This is a flowchart illustrating the principle of user batch calculation and storage processing based on weight allocation in existing technology.

[0044] Figure 2 This is a flowchart of an embodiment of a multi-user, multi-batch calculation and storage processing method based on weight allocation according to the present invention.

[0045] Figure 3 This is a detailed flowchart of an embodiment of a multi-user, multi-batch calculation and storage processing method based on weight allocation according to the present invention.

[0046] Figure 4 This is a schematic diagram of an embodiment of a multi-user, multi-batch computing and storage processing system based on weight allocation according to the present invention.

[0047] Figure 5 This is a schematic diagram of the existing technology regarding the order of computation execution.

[0048] Figure 6 This is a schematic diagram illustrating the execution order of calculations in an embodiment of a weighted multi-user, multi-batch computation and storage processing system according to the present invention. Detailed Implementation

[0049] Example of a weighted multi-user, multi-batch computation and storage processing method:

[0050] See Figure 2 andFigure 3 The application provides a multi-user multi-batch computing and storage processing method based on weight distribution, which comprises the following steps:

[0051] Step S1, when receiving an access request or a query request of a client, marking the client as a latest active user, and decoupling the active user id, user information, batch information and data items under the batch through a message queue to serve as data input.

[0052] Step S2, obtaining the active user id from the message queue and performing weight distribution calculation on the active user, wherein the weight is calculated according to the contribution (numerator) of each user in the batch and the total contribution (denominator), and then multiplied by the distribution amount (multiplier) of the batch.

[0053] Step S3, storing the calculated distribution result data into an account table.

[0054] Step S4, updating the user calculation batch id to the latest batch id of the system.

[0055] Further, the system running steps of the above-mentioned active user triggered computing mechanism are as follows:

[0056] Firstly, a user accesses the system or performs a distribution result query operation through a client module 10.

[0057] Then, a business module 20 obtains that the user is a latest active user, and inputs the active user id to a distribution module 30 through a message queue.

[0058] Next, the distribution module 30 obtains the latest active user id from the message queue, and performs weight distribution calculation on the user according to the execution steps of the distribution module 30.

[0059] Finally, the calculated distribution result data is stored into an account table.

[0060] Among them, a batch table is generated according to the input batch information and data items under the batch, it is judged whether the user calculation batch id of the active user is the latest batch id of the system stored in the batch table, and weight distribution calculation is performed according to the judgment result.

[0061] After obtaining the latest active user id, an account table is generated according to the registered user information, the account table is used to store the user id, the user calculation batch id and the user distribution result, wherein the user calculation batch id is the latest batch id of a user that has been calculated. The account table can be a block.

[0062] After obtaining the latest active user id, a batch table is generated according to the input batch information and the data items under the batch, the batch table being used to store the batch id, the batch-user id and the data items under the batch; wherein the batch id is used as the identification of different batches, and the batch-user id is used as the identification of different users under the batch.

[0063] After determining that the user calculated batch id of the active user is the system latest batch id stored in the batch table, all batch ids under the batch-user id that have not been calculated are searched in the batch table according to the user calculated batch id and the system latest batch id, and based on the searched batch table, the data items under a batch are obtained by traversal to perform weight distribution calculation until all batch ids are traversed.

[0064] In this embodiment, when performing multi-user and multi-batch calculation and storage, the execution steps of weight distribution calculation are performed in turn according to the triggering order of the active users. It can be seen that the weight distribution calculation of multiple active users is performed in turn according to the triggering order of the active users.

[0065] In this embodiment, when receiving user information, the existing privacy data classification set is used to mine the privacy data in the received user information, and the privacy level of the mined privacy data is analyzed in real time, so as to perform privacy classification and privacy protection on the privacy data of the user information.

[0066] Specifically, the present embodiment can also mine the existing storage of the big data database to determine the privacy data of the big data database; the mined privacy data is classified, and the privacy data is classified into a classification set according to the data classification.

[0067] When the big data database receives data, the server uses the classification set of the privacy data to mine the received data, searches for a plurality of privacy data in the received data, and saves the searched plurality of privacy data.

[0068] For the searched privacy data N, find the data classification set E to which the privacy data N belongs; calculate the privacy weight of the privacy data N and determine the privacy level of the privacy data N, and perform privacy encryption processing on the privacy data N according to the privacy level standard of the privacy data N; traverse all the searched privacy data to determine the privacy level standard of all the searched privacy data and perform privacy encryption processing on all the privacy data. Finally, the frequency of all the privacy data in the data classification set E found in the above steps in the big data database is calculated as the privacy weight of the privacy data extracted in the above steps.

[0069] In this embodiment, when a user registers, the client uses an account to apply for registration to the server;

[0070] The server sends a requirement information to the client, which requires to prove that it is an objective existing user, such as providing a picture which needs to be identified by human eyes and fill in the identification content;

[0071] The client sends the returned data to the server according to the requirement of the returned data after the user fills in the information;

[0072] The server verifies the returned data of the client, and after the verification is correct, the account and the current login time of the client are registered in the smart contract;

[0073] After the user successfully registers, the user can access the related smart contract.

[0074] When receiving the access request or query request of the client, the account of the user is checked by accessing the smart contract to check whether the user is a currently valid active user.

[0075] In addition, the asymmetric encryption algorithm is used to generate the private key and the public key for the user information which needs to be shared, and the block data encrypted by the public key is stored in the server. Specifically, the data can be encrypted and decrypted by the encryption and decryption component. The encryption and decryption component is a decryption rule which removes the traditional block chain to obtain virtual currency, and avoids the limitation that the block chain technology must obtain virtual currency. The block chain bottom core encryption and decryption technology can be independently implemented. The elliptic curve algorithm (Elliptic Curve Algorithm) is modified, the secure hashing algorithm (SecureHashing Algorithm) is added to increase the depth of the algorithm, so as to ensure the security and consistency of the data. In the embodiment, the modified algorithm uses asymmetric encryption, and the data of the block to be placed is encrypted by default using the public key and placed in the server storage. The user can obtain the personal private key through the personal private key interface on the system, and decrypt the block data which belongs to the user's management and can be viewed.

[0076] Among them, the user information stored in the block is encrypted by a predetermined number of times through a secure hash algorithm and a specific salt value to convert into corresponding first characters, and then the first characters are encrypted by a predetermined number of times through a data encryption algorithm by adding a specific salt value to convert into second characters, and the second characters are encrypted again through the Rijndael encryption algorithm to generate the final third characters, and the third characters are compressed and saved in the specified directory of the corresponding server. Specifically, the user can encrypt the data stored in the block by a specified number of times through a secure hash algorithm by adding a specific salt value to convert into corresponding characters, and then encrypt the characters by a specified number of times through a data encryption algorithm (Data Encryption Algorithm) by adding a salt value to convert into new characters, and the final characters are generated by encrypting the new characters again through the Advanced Encryption Standard (Advanced Encryption Standard), and the final characters are compressed and saved in the specified directory of the corresponding server. In addition, when decrypting, the original data is obtained by decrypting in reverse according to the encryption rule, and then the data is combed through the decryption interface call, and the data meeting the personal authority is presented.

[0077] After the encrypted user data forms block data, the block data is indexed and distinguished through the Merkle tree algorithm. Specifically, the block data can be indexed and distinguished through a block data retrieval component. After the encrypted data forms a block, the Merkle tree is used to index and distinguish the block data, thereby facilitating the query of the corresponding data and the statistics of the related data.

[0078] Therefore, compared with the prior art, the present application has the following advantages:

[0079] 1. The present application replaces the original scheme of the timing task by triggering the task, and divides the original scheme of each batch of calculation amount from the same time to multiple times, thereby reducing the calculation concurrency in unit time, relieving the high server load and the calculation congestion, shortening the calculation execution time, reducing the user query waiting time, and achieving near real-time effect in the user perception layer and better experience.

[0080] 2. The present application realizes calculation shunting through the triggering task mechanism, so that the server resource distribution is more balanced, and the utilization efficiency of the idle resources of the original scheme server is effectively improved.

[0081] 3. The present application reduces the calculation amount in unit time of the original scheme, and also relieves the database access congestion, improves the execution efficiency and user experience.

[0082] 4. The present application realizes efficient matching of business demand and computing resources based on the triggering calculation mechanism of active users, reduces the early consumption and waste of server resources of the original scheme, and improves the running efficiency.

[0083] Multi-user multi-batch computing and storage processing system based on weight distribution

[0084] The multi-user multi-batch computing and storage processing system based on weight distribution comprises a client module 10, a business module 20 and a distribution module 30, which are built by Vue and Java, the client module 10 is used for providing a visual front-end interface and performing information interaction with the business module 20 through an API interface. Figure 4 The client module 10 mainly provides a visual front-end interface for user registration, access and interaction operation (such as task acquisition, contribution acquisition and query of distribution result) of the system, depends on the system business module 20, and realizes information interaction with the business module 20 through the API interface.

[0085] The business module 20 executes a business-related program, and user information, batch information and data items under a batch required for weight distribution calculation generated by the business-related program are decoupled through a message queue and used as data input of the distribution module 30. The business module 20 executes a business-related program, can register a user id, can acquire a latest active user, and user information, batch information and data items (numerator, denominator and multiplier) required for weight distribution calculation generated by the business-related program are decoupled through a message queue and used as data input of the distribution module 30. The active user refers to a user whose behavior triggers an active condition, such as a user currently accessing the system or currently performing a distribution result query operation, and the active condition can be set differently according to actual business requirements.

[0086] The distribution module 30 acquires the active user id from the message queue and performs weight distribution calculation on the active user, stores the calculated distribution result data into an account table, and updates the user calculation batch id to the latest batch id of the system.

[0087] Further, the function of the distribution module 30 comprises:

[0088] The account table is generated according to the user information registered by the business module 20, and is used for storing a user id, a user calculation batch id and a user distribution result. The user calculation batch id refers to the latest batch id of a user that has been calculated.

[0089] The distribution module 30 generates a batch table according to the batch information and data items under a batch input by the business module 20, and the batch table is used for storing a batch id, a batch-user id and data items (numerator, denominator and multiplier) under a batch. The batch id is used as an identifier of different batches. The batch-user id is used as an identifier of different users under a batch.

[0090] The distribution module 30 judges whether the user calculation batch id of the latest active user id input by the business module 20 is the latest batch id of the system stored in the batch table.

[0091] The distribution module 30 searches for all uncalculated batch- user ids under the batch- user id (batch- user id = active user id) in the batch table according to the user calculation batch id and the system latest batch id, and performs weight distribution calculation on the data items (numerator, denominator and multiplier) under a batch by traversing based on the searched batch id data list, until all batch ids are traversed;

[0092] The distribution module 30 stores the calculated distribution result data into the account table;

[0093] The distribution module 30 updates the user calculation batch id to the system latest batch id.

[0094] In actual application, as shown in Figure 5 and Figure 6 , the calculation execution sequence of the prior art and the present application is respectively depicted by Figure 5 and Figure 6 . In the “user- batch” square matrix of Figure 5 , Figure 6 , the gray square indicates that the batch corresponding to the user has been calculated, and the arrow indicates the direction of calculation execution.

[0095] Through observation and comparison of Figure 5 and Figure 6 , it can be found that the calculation execution sequence of the prior art is to perform traversal calculation on all users in a single batch by a timing task and to perform calculation in batches in turn. The present application transforms the original timing calculation mechanism into a trigger calculation mechanism based on active users. The mechanism of trigger calculation based on active users divides the original calculation of multiple users in each batch at the same time into multiple times, that is, the execution sequence of the distribution module 30 is transformed from “multiple users in a batch” to “multiple batches for a user”, so that a new calculation execution sequence in units of users is realized. Therefore, the calculation mechanism of the weight distribution system of the present application is different from the timing calculation mechanism in the technical background, but the execution sequence of the distribution module 30 is transformed from “multiple users in a batch” to “multiple batches for a user”, realizing a trigger calculation mechanism based on active users.

[0096] The embodiment also provides a consensus calculation system, which can be based on a POW mechanism or a POS mechanism. When the POW mechanism is used, the user weight is used as a difficulty adjustment system for POW random number calculation. When the POS mechanism is used, all blockchain block encapsulation nodes will count all user weights in the last day when performing block encapsulation and verification, and will obtain the block encapsulation winner of the current block by calculating the random space based on these user weights. The user with a larger weight has a larger probability of obtaining the block encapsulation right.

[0097] To prevent the user weight of an application from being too large to monopolize the computing power of the blockchain system, thereby affecting the distribution of block packaging nodes in the entire network, the weight statistics will calculate the average number of users in the current statistics day, and for applications less than the average, the actual number of users will be used as the application weight; for applications exceeding the average, the excess part will be calculated using a decay function such as square root.

[0098] Therefore, the present embodiment completes the user weight distribution through the weight distribution system composed of the client module 10, the service module 20, and the distribution module 30, provides an active user-based trigger computing mechanism, combines the actual needs of the service scene, changes the execution order of the distribution module 30 from "one batch of multiple users" to "one user of multiple batches", thereby improving the running efficiency and utilization efficiency of the server computing resources, reducing the database access pressure, and improving the execution result update speed and user experience.

[0099] It can be seen that each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between each embodiment can be referred to each other. For the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0100] The present application is described with reference to flowcharts and / or block diagrams according to the method, device (apparatus), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one block or multiple blocks.

[0101] These computer program instructions can also be stored in a computer-readable memory that can guide the computer or other programmable data processing devices to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one block or multiple blocks.

[0102] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 one or more flowcharts and / or blocks

[0103] The above detailed description of the method and system provided by the present application is provided, and the principle and implementation mode of the present application are described by applying specific examples. The above example is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as a limitation of the present application.

[0104] The above-mentioned embodiments are only preferred embodiments of the present application, and cannot be used to limit the protection scope of the present application. Any non-essential changes and replacements made by those skilled in the art on the basis of the present application shall fall within the protection scope of the present application.

Claims

1. A method for multi-user multi-batch computation and storage processing based on weight distribution, characterized in that, The method comprises the following steps: When receiving an access request or a query request of a client, the client is marked as the latest active user, and the active user id, user information, batch information and data items under the batch are decoupled through a message queue and taken as data input; The active user id is obtained from the message queue, and weight distribution calculation is performed on the active user; The calculated distribution result data is stored in the account table; The user calculation batch id of the active user is updated to the latest batch id of the system; The batch table is generated according to the input batch information and data items under the batch, it is judged whether the user calculation batch id of the active user is the latest batch id of the system stored in the batch table, and weight distribution calculation is performed according to the judgment result; After obtaining the latest active user id, a batch table is generated according to the input batch information and data items under the batch, the batch table is used to store batch id, batch-user id and data items under the batch; wherein the batch id is used as the identifier of different batches, and the batch-user id is used as the identifier of different users under the batch; After determining that the user calculation batch id of the active user is the latest batch id of the system stored in the batch table, all uncalculated batch ids under the batch-user id are searched in the batch table according to the user calculation batch id and the latest batch id of the system, and weight distribution calculation is performed on the data items under the batch by traversal based on the searched batch table, until all batch ids are traversed.

2. The method of claim 1, wherein: After obtaining the latest active user id, an account table is generated according to the registered user information, the account table is used to store user id, user calculation batch id and user distribution result; wherein the user calculation batch id is the latest batch id that has been calculated for a user.

3. The method of claim 1 or 2, wherein: When performing multi-user and multi-batch calculation and storage, the weight distribution calculation is performed according to the trigger order of the active user.

4. The method of claim 1 or 2, wherein: When receiving user information, the privacy data in the received user information is mined through an existing privacy data classification set, and the privacy level of the mined privacy data is analyzed in real time, and the privacy data of the user information is subjected to targeted privacy classification and privacy protection.

5. The method of claim 1 or 2, wherein: When a user registers, the client uses an account to apply for registration to the server; The server sends a requirement information to the client to prove that it is an objectively existing user, including providing a picture that needs to be identified by the human eye and filling in the identification content; The client sends the picture to the server after the user fills it in according to the required returned data; The server verifies the returned data of the client, and after verification, the account of the client and the current registration time are registered in the smart contract; After successful registration, the user can access the related smart contract.

6. The method of claim 5, wherein: Upon receiving an access request or a query request of a client, it is checked by accessing the smart contract whether the account of the client is a current valid active user.

7. A multi-user multi-batch computing and storage processing system based on weight assignment, characterized in that, The system is applied to the weight distribution based multi-user multi-batch calculation and storage processing method of any one of claims 1 to 6, and the system comprises: A client module, a business module and a distribution module, the client module is used to provide a visual front-end interface and interact with the business module through an API interface; The business module executes a business related program, and generates user information, batch information and data items under the batch required for weight distribution calculation, which are decoupled through a message queue and used as data input of the distribution module; The distribution module obtains the active user id from the message queue and performs weight distribution calculation on the active user; stores the calculated distribution result data into an account table; and updates the user calculation batch id to the latest batch id of the system.

8. The system of claim 7, wherein: The distribution module generates an account table according to the user information registered by the business module; The distribution module generates a batch table according to the batch information and data items under the batch input by the business module; The distribution module judges whether the user calculation batch id is the latest batch id of the system stored in the batch table according to the latest active user id input by the business module; The distribution module searches for all uncalculated batch ids under the batch-user id in the batch table according to the user calculation batch id and the latest batch id of the system, and performs weight distribution calculation on the data items under a batch by traversing based on the searched batch id data list until all batch ids are traversed; The distribution module stores the calculated distribution result data into the account table; The distribution module updates the user calculation batch id to the latest batch id of the system.

Citation Information

Patent Citations

  • Generic entry and exit network interface system and method

    US20180329964A1