Microservice distributed profit tracking method and system

By using gateways and business systems to generate request markings and step size records in microservice architecture, the difficulty of log screening and time-consuming analysis in complex business systems is solved, and rapid monitoring of profit tracking is achieved.

CN116433285BActive Publication Date: 2024-11-22GUANGZHOU JITIAN NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202310304735.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2024-11-22
Estimated Expiration
2043-03-24

AI Technical Summary

Technical Problem

Profit tracking based on existing log analysis systems has problems such as log screening and time-consuming log analysis in complex business systems. Especially the overlap between different business scenarios and logics leads to log screening difficulties, and the log data is discrete data, which is difficult. Direct tandem analysis.

Method used

By introducing gateways and business systems into the microservice architecture, generating step size records of requested labels and recording asset changes, and storing them to the database, ensuring that the asset change operations of the same user can be distinguished and identified between different business scenarios and logics. The information and requested numbers are combined to identify the asset change process in sequence to achieve rapid log analysis.

Benefits of technology

Effectively overcome the difficulties in log screening and time-consuming log analysis problems, data analysts can quickly restore asset change processes and achieve rapid monitoring of profit tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116433285B_ABST
    Figure CN116433285B_ABST
Patent Text Reader

Abstract

The present application discloses a microservice distributed profit tracking method and system, which receives user request information through a gateway, generates a request number according to the user request information, obtains multiple step records according to the current operation steps and the business operation steps through a business system, and the step records include the request number and the step information, and stores the multiple step records in a database, wherein the request number can effectively distinguish and identify the operations involving assets between different business scenarios and business logics of the same user, and identify the asset change operation information corresponding to the step record generated by the same user in the same operation; and the step information and the request number can effectively identify the asset change operation information generated by the same user in sequence, so that data analysts can quickly restore the process of asset changes in the same operation, and then effectively track profits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of business data processing technology, and in particular to a microservice distributed profit tracking method and a microservice distributed profit tracking system. Background Art

[0002] With the rapid development of Internet products, the ever-changing business environment and user demands have brought about complex business needs, which has led to an increasing number of business scenarios that business systems need to support and more and more business logic, and the complexity of the system has also increased rapidly. At the same time, due to the evolution of microservice architecture, the implementation of business logic often requires the joint collaboration of multiple services, making the increasing complexity of business systems a normal phenomenon, and making profit tracking of complex business systems more complicated.

[0003] The so-called profit tracking refers to the recording and tracking of the sequence of steps and types of asset changes in the system when a user makes a single request to the business system or when the system issues rewards to the user, so that subsequent data analysts can calculate the profit margin of each business system and the proportion of gain or loss of each step of the system in real time based on the asset change records, thereby monitoring the revenue status of the system;

[0004] In the existing technology, most profit tracking is implemented based on the solution of log analysis system. However, since different business scenarios and business logics involved in profit tracking often overlap, and the corresponding log data are discrete data and cannot be directly connected in series, the existing profit tracking based on log analysis system has disadvantages such as difficult log screening and time-consuming log analysis. Summary of the invention

[0005] The embodiments of the present application provide a microservice distributed profit tracking method and a microservice distributed profit tracking system, which can at least ensure that the present application solution generates a request number according to the user request information and records multiple step records of asset changes in the business system, thereby distinguishing and identifying the user's operations involving assets between different business scenarios and business logics, identifying the asset changes generated by the same user in the same operation, and thus overcoming the problem of difficult log screening; and sequentially identifying each step in the process, thereby solving the problem of time-consuming log analysis.

[0006] In a first aspect, an embodiment of the present application provides a microservice distributed profit tracking method, which is applied to a microservice distributed profit tracking system. The microservice distributed profit tracking method is applied to a microservice distributed profit tracking system, and the system includes a gateway and a business system, including:

[0007] The gateway receives user request information and generates a request number according to the user request information;

[0008] The gateway sends the user request information carrying the request number to the first business system, so that the first business system obtains the current operation step number from the cache information according to the request number;

[0009] The first business system obtains a plurality of step length records according to the current operation step number and the first business operation step number, wherein the step length records include the request number and step length information;

[0010] The first business system stores the plurality of step length records in a database, and sends the operation result corresponding to the user request information to the corresponding user through the gateway.

[0011] In some embodiments, after the first business system stores the plurality of step length records in a database, the system further includes:

[0012] The first business system sends the user request information carrying the request number to the second business system, so that the second business system obtains the current operation step number from the cache information according to the request number;

[0013] The second business system obtains a plurality of step length records according to the current operation step number and the second business operation step number, wherein the step length records include the request number and step length information;

[0014] The second business system stores the plurality of step length records in a database.

[0015] In some embodiments, after obtaining Y step length records according to the current operation step number X and the first business operation step number Y, the first business system updates the current operation step number in the cache information to X+Y;

[0016] After obtaining Z step length records according to the current operation step number Z and the first service operation step number X+Y, the second service system updates the current operation step number in the cache information to X+Y+Z.

[0017] In some embodiments, the first business system obtains Y step length records according to the current operation step number X and the first business operation step number Y, including:

[0018] The first business system performs Y asset change processes according to the user request information, and generates step length information of each asset change process according to the number of times the first business system currently performs asset change processes, which are X+1 to X+Y respectively;

[0019] A plurality of the step length records are obtained according to the plurality of the step length information and the request number.

[0020] In some embodiments, the second business system obtains Z step length records according to the current operation step number Z and the first business operation step number X+Y, including:

[0021] The second business system performs Z asset change processes according to the user request information, and generates step length information of each asset change process according to the number of times the second business system currently performs asset change processes, which are X+Y+1 to X+Y+Z respectively;

[0022] A plurality of the step length records are obtained according to the plurality of the step length information and the request number.

[0023] In some embodiments, the current operation step number represents the number of times the asset corresponding to the user request information has changed. When the asset corresponding to the user request information has not changed, the current operation step number is 0.

[0024] In some embodiments, the method comprises:

[0025] The gateway receives a plurality of user request information and generates a plurality of request numbers according to the plurality of user request information;

[0026] The gateway sends the plurality of user request information carrying the request number to the corresponding business system, so that the business system obtains the current operation step number from the cache information according to the carried request number;

[0027] The plurality of business systems obtain a plurality of step length records according to the current operation step number and the business operation step number, wherein the step length records include the request number and step length information;

[0028] The multiple business systems store the multiple step length records in a database, and send the operation results corresponding to the multiple user request information to the corresponding multiple users through the gateway.

[0029] In a second aspect, an embodiment of the present application provides a microservice distributed profit tracking system, the system comprising a gateway and a business system;

[0030] The gateway is used to receive user request information and generate a request number according to the user request information; send the user request information carrying the request number to the first business system, so that the first business system obtains the current operation step number from the cache information according to the request number;

[0031] The first business system is used to obtain multiple step records based on the current operation steps and the first business operation steps, and the step records include the request number and step information; store the multiple step records in a database, and send the operation results corresponding to the user request information to the corresponding user through the gateway.

[0032] In a third aspect, an embodiment of the present application provides a controller comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the microservice distributed profit tracking method as described in any one of the embodiments in the first aspect is implemented.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the microservice distributed profit tracking method as described in any one of the embodiments in the first aspect.

[0034] The present application has at least the following beneficial effects: the present application receives user request information through a gateway, generates a request number according to the user request information, and sends the user request information carrying the request number to a first business system, so that the first business system obtains the current operation step number from the cache information according to the request number; the first business system obtains a plurality of step length records according to the current operation step number and the first business operation step number, the step length records including the request number and the step length information, stores the plurality of step length records in a database, and sends the operation result corresponding to the user request information to the corresponding user through the gateway, wherein the request number can effectively distinguish and identify the operations involving assets between different business scenarios and business logics of the same user, identify the asset change operation information corresponding to the step length record generated by the same user in the same operation, and avoid the influence caused by the overlap between different business scenarios and business logics; and the step length information and the request number can effectively identify the asset change operation information generated by the same user in sequence, and then connect them in series, so that data analysts can quickly restore the process of asset changes in the same operation, and then effectively track profits. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic diagram of a business system in the prior art;

[0036] Figure 2 A flowchart of a microservice distributed profit tracking method proposed in an embodiment of the present application;

[0037] Figure 3 Another flow chart of the microservice distributed profit tracking method proposed in one embodiment of the present application;

[0038] Figure 4 A flowchart for updating the current number of operation steps in the microservice distributed profit tracking method proposed in one embodiment of the present application;

[0039] Figure 5A flowchart of a first business system generating a step length record in a microservice distributed profit tracking method proposed in an embodiment of the present application;

[0040] Figure 6 A flowchart of a second business system generating a step length record in a microservice distributed profit tracking method proposed in an embodiment of the present application;

[0041] Figure 7 This is a timing diagram of a microservice distributed profit tracking method proposed in an embodiment of the present application;

[0042] Figure 8 This is an example diagram of a microservice distributed profit tracking method proposed in an embodiment of the present application;

[0043] Fig. 9 This is a structural diagram of a controller proposed in another embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] In some embodiments, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms first, second, etc. in the specification, claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0046] In the existing technology, with the rapid development of Internet products, the ever-changing business environment and user demands have brought about complex business needs. The business scenarios that business systems need to support are becoming more and more extensive, and the business logic they cover is becoming more and more. The complexity of the system is also increasing rapidly. At the same time, due to the evolution of microservice architecture, the implementation of business logic often requires the joint collaboration of multiple services. In short, the increasing complexity of business systems has become a normal state. In this case, tracking the profits of complex business systems has also become more complicated.

[0047] The so-called profit tracking refers to the recording and tracking of the sequence of steps and types of asset changes within the system when a user makes a single request to the business system or the system issues rewards to the user, so that subsequent data analysts can calculate the profit margin of each business system and the proportion of gain or loss of each step of the system in real time based on the asset change records, thereby monitoring the revenue status of the system.

[0048] refer to Figure 1 , Figure 1 The following is a schematic diagram of a business system in the prior art. Currently, in the microservice scenario, the mainstream implementation method of profit tracking is based on the log analysis system, but most log analysis systems record discrete logs. However, as business logic becomes increasingly complex, this solution is becoming less and less suitable for current business systems.

[0049] As a necessary capability of business systems, logs are responsible for recording discrete events that occur during program operation and for analyzing program behavior in the post-event phase. In profit tracking scenarios, logs are recorded for changes in business system assets and then used for profit analysis.

[0050] The existing profit tracking methods have the following problems:

[0051] 1) Difficulty in log screening: There are overlaps between different business scenarios and business logics. The business logs printed by overlapping logics may interfere with each other, making it difficult to screen out the correct associated logs of asset gains and losses involved in the same operation by the same user.

[0052] 2) Log analysis is time-consuming: The collected logs are just discrete data, and can only be analyzed manually in series to restore the profit change process of the business system as much as possible. With the increase of business logic and system complexity, log collection, log screening and log analysis are becoming more and more time-consuming and labor-intensive, making it difficult to quickly track and monitor business profits.

[0053] In order to at least solve the above problems, based on Figure 1 A business system with a log recording function, the present application discloses a microservice distributed profit tracking method and system, which receives user request information through a gateway, generates a request number according to the user request information, obtains multiple step records according to the current operation steps and the business operation steps through the business system, the step record includes the request number and the step information, and stores the multiple step records in a database, wherein the request number can effectively distinguish and identify the operations involving assets between different business scenarios and business logics of the same user, identify the asset change operation information corresponding to the step record generated by the same user in the same operation, avoid the impact caused by overlap between different business scenarios and business logics, and solve the problem of difficulty in log screening; and the step information and the request number can effectively identify the asset change operation information generated by the same user in sequence, and then connect them in series, so that data analysts can quickly restore the process of asset changes in the same operation, solve the problem of time-consuming log analysis, and effectively track profits.

[0054] The embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0055] refer to Figure 2 , Figure 2 This is a flowchart of the microservice distributed profit tracking method proposed in the first aspect of the present application. In some embodiments, the present application embodiment provides a microservice distributed profit tracking method, which is applied to a microservice distributed profit tracking system. The tracking system includes a gateway and a business system. The tracking method includes but is not limited to the following steps S210, step S220, step S230 and step S240;

[0056] Step S210, the gateway receives user request information and generates a request number according to the user request information;

[0057] Step S220, the gateway sends the user request information carrying the request number to the first business system, so that the first business system obtains the current operation step number from the cache information according to the request number;

[0058] Step S230, the first business system obtains a plurality of step length records according to the current operation step number and the first business operation step number, wherein the step length records include a request number and step length information;

[0059] In step S240, the first business system stores the plurality of step length records in a database, and sends the operation result corresponding to the user request information to the corresponding user through the gateway.

[0060] In some embodiments, the gateway in the present application is a request forwarding gateway. Every time a user initiates a request, it will pass through a unified gateway entrance. When the request passes through the gateway, the gateway will generate a globally unique request label unique_id in the system for each request to distinguish this request.

[0061] In some embodiments, there are one or more business systems in the present application, but when the business system involves an asset change operation, corresponding log information will be generated. The log information records specific information such as the operation object, operation time, and operation type of the asset change operation involved in the business system. At the same time, there is a correspondence between the log information and the step record mentioned in the present application. The log information generated by the same asset change operation includes the corresponding step record, or the index information of the log information generated by the same asset change operation and the correspondence between the step record are stored in the database, so that users can directly realize log collection, log screening, and log analysis functions through the step records in the log information or through the correspondence stored in the database, and in the profit tracking scenario, profit analysis can be performed more quickly and effectively through log records.

[0062] In some embodiments, the present application receives user request information through a gateway and generates a request number based on the user request information. The request number is a globally unique identifier corresponding to the user request. By storing the step records generated when the asset operation is involved, including the request number, in a database, the user can obtain and identify the asset change operation information and log information corresponding to the step records generated by the same user in the same operation according to the request number when performing a subsequent log search. This effectively distinguishes and identifies the operations involving assets in different business scenarios and business logics of the same user, thereby solving the problem in the prior art that there is overlap between different business scenarios and business logics, and the business logs printed by the overlapping logic may interfere with each other, making it difficult to screen out the correct associated logs of asset gains and losses involved in the same operation by the same user.

[0063] In some embodiments, the present application obtains multiple step records through the business system according to the current operation steps and the business operation steps. The step records include request numbers and step information. The step information and request numbers can effectively identify the sequence of asset change operation information generated by the same user, so that when the user performs a subsequent log search, the information can be connected in series, so that the user can quickly and effectively restore the asset change process in the same operation in sequence according to the step information, thereby solving the problem that the logs collected in the prior art are only discrete data and can only be manually analyzed in series. As the business logic and system complexity increase, log collection, log screening and log analysis become increasingly time-consuming and labor-intensive, and it is difficult to quickly track and monitor business profits.

[0064] refer to Figure 3 , Figure 3 Another flow chart of the microservice distributed profit tracking method proposed in one embodiment of the present application. In some embodiments, after the first business system stores the multiple step length records in the database, the steps also include but are not limited to the following steps S310, S320 and S330;

[0065] Step S310, the first business system sends the user request information carrying the request number to the second business system, so that the second business system obtains the current operation step number from the cache information according to the request number;

[0066] Step S320, the second business system obtains a plurality of step length records according to the current operation step number and the second business operation step number, wherein the step length records include a request number and step length information;

[0067] Step S330: The second business system stores the multiple step length records in a database.

[0068] In some embodiments, each request initiated by the user is designed for multiple services. Therefore, after the first service system stores the multiple step records involved in the first service in the database, the user request information carrying the request number is sent to the second service system, so that the second service system repeats the method steps of the first service system to obtain the multiple step records involved in the second service, and stores the multiple step records in the database. If the user request also involves a third service at this time, the user request is sent to the corresponding service of the third service, and so on, to realize distributed profit tracking of microservices for multiple services.

[0069] refer to Figure 4 , Figure 4 A flowchart of updating the current operation step number in the microservice distributed profit tracking method proposed in an embodiment of the present application. In some embodiments, the microservice distributed profit tracking method includes but is not limited to the following steps S410 and S420;

[0070] Step S410: After obtaining Y step length records according to the current operation step number X and the first business operation step number Y, the first business system updates the current operation step number in the cache information to X+Y;

[0071] Step S420: After obtaining Z step length records according to the current operation step number Z and the first service operation step number X+Y, the second service system updates the current operation step number in the cache information to X+Y+Z.

[0072] In some embodiments, the current operation step number exists in the system cache. When the requested operation involves asset changes, the business service needs to record the asset changes according to the unique_id. The business service queries the cache for the current operation step number of the asset change corresponding to the unique_id. At the same time, each time the business service completes the operation involving asset changes in the business and forwards the business request to other business services involving asset changes, the current operation step number in the cache information is updated according to the number of asset changes in the current business. For example, in steps S410 to S420: the first business system (business A) obtains Y step length records based on the current operation step number X and the first business operation step number Y, and then updates the current operation step number in the cache information to X+Y (the number of asset changes in the current business A); the second business system (business B) obtains Z step length records based on the current operation step number Z and the first business operation step number X+Y, and then updates the current operation step number in the cache information to X+Y+Z (the number of asset changes in the current business B).

[0073] In some embodiments, the current operation step number represents the number of times the asset corresponding to the user request information has changed. When the asset corresponding to the user request information has not changed, the current operation step number is 0. It can be imagined that for the request identifier unique_id, if there is no current operation step number, it means that no asset change has occurred before, and the operation step number returned from the cache is 0; otherwise, the actual operation step number x is returned, indicating that the asset has changed x steps before.

[0074] refer to Figure 5 , Figure 5 In the microservice distributed profit tracking method proposed in an embodiment of the present application, a flowchart of a first business system generating a step length record, in some embodiments, the first business system obtains Y step length records according to the current operation step number X and the first business operation step number Y, including but not limited to the following steps S510 and S520;

[0075] Step S510: the first business system performs Y asset change processes according to the user request information, and generates step length information of each asset change process according to the number of times the first business system currently performs asset change processes, which are X+1 to X+Y respectively;

[0076] Step S520, obtaining multiple step length records according to multiple step length information and request numbers.

[0077] In some embodiments, corresponding to steps S510 to S520, assuming that the asset changes of business A involve a total of Y asset operations, each asset operation is calculated as one step, and then a record is generated for each step. Each record has a step length, which is X+1,..., X+Y, and each record is connected in series by the same unique_id.

[0078] refer to Figure 6 , Figure 6 A flowchart of a second business system generating a step length record in a microservice distributed profit tracking method proposed in an embodiment of the present application. In some embodiments, the second business system obtains Z step length records according to the current operation step number Z and the first business operation step number X+Y, including but not limited to the following steps S610 and S620;

[0079] Step S610: the second business system performs Z asset change processes according to the user request information, and generates step length information of each asset change process according to the number of times the second business system currently performs asset change processes, which are X+Y+1 to X+Y+Z respectively;

[0080] Step S620, obtaining multiple step length records according to multiple step length information and request numbers.

[0081] In some embodiments, corresponding to steps S610 to S620, assuming that the asset changes of business B involve a total of Z asset operations, each asset operation is calculated as one step, and then a record is generated for each step. Each record has a step length, which is X+Y+1,..., X+Y+Z, and each record is connected in series by the same unique_id.

[0082] In some embodiments, the microservice distributed profit tracking method also includes: the gateway receives multiple user request information and generates multiple request numbers according to the multiple user request information; the gateway sends the multiple user request information carrying the request numbers to the corresponding business system, so that the business system obtains the current operation step number from the cache information according to the carried request number; the multiple business systems obtain multiple step records according to the current operation step number and the business operation step number, and the step record includes the request number and the step information; the multiple business systems store the multiple step records in the database, and send the operation results corresponding to the multiple user request information to the corresponding multiple users through the gateway. It can be imagined that because the unique_id in this application can uniquely correspond to the user process, the process requested by any user can be restored according to the gradually increasing order of the number of operation steps. Therefore, this application is still valid when multiple users simultaneously perform changes to the same asset, and can enable data analysts to quickly identify the asset change operation information corresponding to the step record generated by the same user in the same operation, and restore the asset change process in the same operation, thereby effectively tracking profits.

[0083] refer to Figure 7 , Figure 7 This is a timing diagram of a microservice distributed profit tracking method proposed in an embodiment of the present application. The microservice distributed profit tracking method of the present application includes the following steps:

[0084] Step S701: The user initiates a request to the gateway;

[0085] Step S702: The gateway generates a globally unique request number (unique_id) for this request;

[0086] Step S703: The gateway forwards the request to the business A system service, and transparently transmits the generated request number (unique_id) to the business A service;

[0087] Step S704: Service A assumes that asset changes are sent this time, and a total of Y times are sent;

[0088] Step S705: Business A service obtains the step number of the current asset change from the cache according to the request number (unique_id);

[0089] Step S706: The cache returns the current step number to the business A service according to the request number (unique_id);

[0090] Step S707: Business A generates Y tracking logs, each of which is assigned a step length, which are X+1, ..., X+Y.

[0091] Step S708: Business A service records the asset tracking log through the database;

[0092] Step S709: After service A is executed, service B is asynchronously called to execute subsequent steps, and the generated request number (unique_id) is transparently passed to service B;

[0093] Step S710: Business A returns the operation result to the gateway;

[0094] Step S711: The gateway returns the operation result to the user;

[0095] Step S712: Business B service assumes that the asset change is sent this time, and a total of Z times are sent;

[0096] Step S713: Business B service obtains the step number of the current asset change from the cache according to the request number (unique_id);

[0097] Step S714: the cache returns the current step number to the business B service according to the request number (unique_id);

[0098] Step S715: Business B generates Z tracking logs, each of which is assigned a step length, which are X+Y+1, ..., X+Y+Z.

[0099] Step S716: Business B service records the asset tracking log through the database.

[0100] In some embodiments, the log overlap problem in the prior art is distinguished by unique_id, and the step information corresponding to the operation steps can effectively solve the discrete problem in log analysis.

[0101] In some embodiments, assuming that the synchronous operation of the business A process has been completed, but business B needs to be asynchronously called to perform subsequent operations, if business B also involves asset changes, the same process as business A is executed, thereby achieving profit tracking of multiple businesses.

[0102] refer to Figure 8 , Figure 8This is an example diagram of the microservice distributed profit tracking method proposed in an embodiment of the present application, in which user 1878016 gives gifts to user 1255566 and user 1338777 respectively. After receiving the gifts, users 1255566 and 1338777 automatically convert them into diamond income corresponding to the value of the gifts. The above example steps occur in multiple business systems, that is, business A "gift business" is a business system, and business B "guild profit sharing" is another system, so the asset changes involved here are:

[0103] 1. Deduct the gift given by user 1878016 to user 1255566;

[0104] 2. User 1255566 receives diamond income of corresponding value;

[0105] 3. Deduct the gift given by user 1878016 to user 1338777;

[0106] 4. User 1338777 receives diamond income of corresponding value.

[0107] The above 4 steps are all processed in the gift business (equivalent to business A). Since user 1255566 and user 1338777 both belong to the same guild 1255566, the diamond revenue needs to be divided with the guild (equivalent to business B). At this time, the gift-giving operation of user 1878016 has ended, and the asset changes involved in the subsequent division processing have nothing to do with user 1878016, so the gift business directly returns the operation results to user 1878016. The asset changes involved in the subsequent division processing are as follows:

[0108] 1. User 1255566 submits diamond revenue share to Guild 1255566;

[0109] 2. User 1338777 submits diamond revenue share to guild 1255566;

[0110] 3. Since Guild 1255566 has set up a guild profit sharing system, Guild 1255566 will also receive an institutional profit sharing system.

[0111] After all operations in the above example are completed, a total of 7 asset operations are involved, and all of them are generated by user 1878016 giving gifts to user 1255566 and user 1338777 respectively.

[0112] It can be seen that the present application can effectively distinguish and identify operations involving assets of the same user in different business scenarios and business logics through request numbers, and identify the asset change operation information corresponding to the step record generated by the same user in the same operation; and through the combination of step information and request numbers, the asset change operation information generated by the same user can be effectively identified in sequence, so that data analysts can quickly restore the process of asset changes in the same operation, and then effectively track profits.

[0113] refer to Fig. 9 , Fig. 9 It is a schematic diagram of the structure of the controller provided in the embodiment of the present application.

[0114] Some embodiments of the present application provide a controller, the controller comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the microservice distributed profit tracking method of any of the above embodiments when executing the computer program, for example, executing the above described Figure 2 Steps S210 to S240 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S420 of the method, Figure 5 Steps S510 to S520 of the method, Figure 6 Steps S610 to S620 of the method, Figure 7 Method steps S701 to S716.

[0115] The controller 900 of the embodiment of the present application includes one or more processors 910 and a memory 920. Fig. 9 In the figure, a processor 910 and a memory 920 are taken as an example.

[0116] The processor 910 and the memory 920 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0117] The memory 920 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 920 may include a high-speed random access memory and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device.

[0118] In some embodiments, the memory 920 may optionally include a memory 920 remotely disposed relative to the processor 910, and these remote memories may be connected to the controller 900 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0119] In some embodiments, when the processor executes the computer program, the microservice distributed profit tracking method of any one of the above embodiments is executed at preset intervals.

[0120] Those skilled in the art will understand that Fig. 9 The system structure shown in the figure does not constitute a limitation on the controller 900, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0121] exist Figure 6 In the controller 900 shown, the processor 910 can be used to call the microservice distributed profit tracking method stored in the memory 920, so as to implement the microservice distributed profit tracking method.

[0122] Based on the hardware structure of the above-mentioned controller 900, various embodiments of the microservice distributed profit tracking system of the present application are proposed. At the same time, the non-transient software programs and instructions required to implement the microservice distributed profit tracking method of the above-mentioned embodiments are stored in the memory. When executed by the processor, the microservice distributed profit tracking method of the above-mentioned embodiments is executed.

[0123] In addition, an embodiment of the present application also provides a microservice distributed profit tracking system, which includes the above-mentioned controller.

[0124] In some embodiments, since the microservice distributed profit tracking system of the embodiments of the present application has the controller of the above-mentioned embodiments, and the controller of the above-mentioned embodiments can execute the microservice distributed profit tracking method of the above-mentioned embodiments, the specific implementation methods and technical effects of the microservice distributed profit tracking system of the embodiments of the present application can refer to the specific implementation methods and technical effects of the microservice distributed profit tracking method of any of the above-mentioned embodiments.

[0125] The present application also provides a computer-readable storage medium storing computer-executable instructions for executing the above-mentioned microservice distributed profit tracking method. For example, the one or more processors can execute the microservice distributed profit tracking method in the above-mentioned method embodiment. For example, the above-mentioned Figure 2 Steps S210 to S240 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S420 of the method, Figure 5 Steps S510 to S520 of the method, Figure 6 Steps S610 to S620 of the method, Figure 7 Method steps S701 to S716.

[0126] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network nodes. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer-readable storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer-readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage systems, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0128] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A microservice distributed profit tracking method, characterized in that: The microservice distributed profit tracking method is applied to a microservice distributed profit tracking system, which includes a gateway and a business system, including: The gateway receives user request information and generates a request number according to the user request information; The gateway sends the user request information carrying the request number to the first business system, so that the first business system obtains the current operation step number from the cache information according to the request number; The first business system obtains a plurality of step length records according to the current operation step number and the first business operation step number, wherein the step length records include the request number and step length information; The first business system stores the plurality of step length records in a database, and sends the operation result corresponding to the user request information to the corresponding user through the gateway.

2. The microservice distributed profit tracking method according to claim 1, characterized in that: After the first business system stores the plurality of step length records in a database, the system further includes: The first business system sends the user request information carrying the request number to the second business system, so that the second business system obtains the current operation step number from the cache information according to the request number; The second business system obtains a plurality of step length records according to the current operation step number and the second business operation step number, wherein the step length records include the request number and step length information; The second business system stores the plurality of step length records in a database.

3. The microservice distributed profit tracking method according to claim 2, characterized in that: The method comprises: After obtaining Y step length records according to the current operation step number X and the first business operation step number Y, the first business system updates the current operation step number in the cache information to X+Y; After obtaining Z step length records according to the current operation step number Z and the first service operation step number X+Y, the second service system updates the current operation step number in the cache information to X+Y+Z.

4. The microservice distributed profit tracking method according to claim 3, characterized in that: The first business system obtains Y step length records according to the current operation step number X and the first business operation step number Y, including: The first business system performs Y asset change processes according to the user request information, and generates step length information of each asset change process according to the number of times the first business system currently performs asset change processes, which are X+1 to X+Y respectively; A plurality of the step length records are obtained according to the plurality of the step length information and the request number.

5. The microservice distributed profit tracking method according to claim 3, characterized in that: The second business system obtains Z step length records according to the current operation step number Z and the first business operation step number X+Y, including: The second business system performs Z asset change processes according to the user request information, and generates step length information of each asset change process according to the number of times the second business system currently performs asset change processes, which are X+Y+1 to X+Y+Z respectively; A plurality of the step length records are obtained according to the plurality of the step length information and the request number.

6. The microservice distributed profit tracking method according to claim 1, characterized in that: The current operation step number represents the number of times the asset corresponding to the user request information has changed. When the asset corresponding to the user request information has not changed, the current operation step number is 0.

7. The microservice distributed profit tracking method according to claim 1, characterized in that: The method comprises: The gateway receives a plurality of user request information and generates a plurality of request numbers according to the plurality of user request information; The gateway sends the plurality of user request information carrying the request number to the corresponding business system, so that the business system obtains the current operation step number from the cache information according to the carried request number; The plurality of business systems obtain a plurality of step length records according to the current operation step number and the business operation step number, wherein the step length records include the request number and step length information; The multiple business systems store the multiple step length records in a database, and send the operation results corresponding to the multiple user request information to the corresponding multiple users through the gateway.

8. A microservice distributed profit tracking system, characterized in that: The system includes a gateway and a business system; The gateway is used to receive user request information and generate a request number according to the user request information; send the user request information carrying the request number to the first business system, so that the first business system obtains the current operation step number from the cache information according to the request number; The first business system is used to obtain a plurality of step length records according to the current operation step number and the first business operation step number, wherein the step length records include the request number and step length information; The plurality of step length records are stored in a database, and the operation result corresponding to the user request information is sent to the corresponding user through the gateway.

9. A controller, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the microservice distributed profit tracking method as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing computer-executable instructions for executing the microservice distributed profit tracking method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Computing architecture for manufacturing and tracking gift cards and controlling value transfer with a machine intelligence engine

    CA2979710A1

  • A real-time calling chain tracking method based on micro-service

    CN109921927A

  • Method for generating distributed accounting right in block chain technology

    CN110348248A

  • Live broadcasting room gift updating method and device, terminal equipment and readable storage medium

    CN113691820A

  • Active defense gateway visitor identifier generation method and system

    CN114615232A