Operation code processing method and device, storage medium and electronic device
By obtaining the resource transfer discount parameters of the target account in the opcode reward system and transferring resources based on this parameter, the problem of single reward method in the existing system is solved, and a more scientific reward mechanism and higher user participation is achieved.
Patent Information
- Application Number
- CN202111503944.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-12-09
AI Technical Summary
The existing opcode reward system is not scientific enough, and the reward method is relatively single, making it difficult to attract more people to help other users realize the use of opcodes.
By obtaining the target operation request triggered by scanning the target account's target operation code on the current period in the current period, if the target account is the first type of account, its resource transfer discount parameters in the current period are obtained. This parameter is determined based on the number of scans of the first type account in the target historical period corresponding to the current period in multiple historical periods and the number of scans of the second type account requested, and then transferred from the resource set of the target account according to the parameters. Target number of resources.
The purpose of dynamically determining the resources to be transferred based on historical data is achieved, the reward method of the operation code reward system has been enriched, the reward rules of the reward system have been optimized, and more users have been attracted to participate in the mutual assistance activities of the operation code.
Smart Images

Figure CN114219528B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to an operation code processing method and device, a storage medium and an electronic device. Background Art
[0002] At present, when a user uses an operation code and his / her own terminal device cannot be used, the user can ask other users for help to use his / her operation code through other users' terminal devices. The reward for the user who provides help is usually a fixed amount of virtual resources pre-configured by the staff. For example, in a ride scenario, when the terminal held by user A cannot use the operation code, user B can ask for help. When user B replaces the operation code currently displayed on the terminal device with the operation code used by user A and provides help to user A, the reward obtained is usually a fixed red envelope, which is not enough to attract more users to help others. In addition, the constructed reward system cannot adaptively adjust the reward range for the newly added users who help others, making it difficult to attract more people to help other users use the operation codes.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide an operation code processing method and device, a storage medium and an electronic device, so as to at least solve the technical problems existing in the related art that the operation code reward system is not scientific enough and the reward method is relatively single.
[0005] According to one aspect of an embodiment of the present invention, there is provided an operation code processing method, comprising: obtaining a target operation request triggered by a target operation code of a scanning target account in a current period in a current cycle; when the target account is a first type account, obtaining a resource transfer discount parameter corresponding to the target account in the current period, wherein the resource transfer discount parameter is a parameter determined according to the number of code scanning times of the first type account in a target historical period corresponding to the current period in multiple historical periods and the number of code scanning requests of the second type account in the target historical period, the multiple historical periods are historical periods in a previous cycle before the current cycle, the first type account is an account that uses the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, the number of code scanning times is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation, the second type account is an account that requests to use the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, and the number of code scanning requests is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation; in response to the target operation request, transferring a target amount of resources from a resource set of the target account according to the resource transfer discount parameter.
[0006] According to another aspect of an embodiment of the present invention, there is further provided an operation code processing device, comprising: a first acquisition module, configured to acquire a target operation request triggered by a target operation code scanning a target account in a current period in a current cycle; and a second acquisition module, configured to acquire, when the target account is a first type of account, a resource transfer discount parameter corresponding to the target account in the current period, wherein the resource transfer discount parameter is a parameter determined based on the number of code scans of the first type of account in a target historical period corresponding to the current period in multiple historical periods and the number of code scan requests of the second type of account in the target historical period, wherein the multiple historical periods are historical periods in a previous period before the current period. The first type of account is an account that uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation, the number of scans is the number of times the operation code of the first type of account is used to replace the operation code of the second type of account to perform a scanning operation, the second type of account is an account that requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation, and the number of requested scans is the number of times the operation code of the first type of account is requested to replace the operation code of the second type of account to perform a scanning operation; a processing module is used to respond to the target operation request and transfer a target number of resources from the resource set of the target account according to the resource transfer discount parameter.
[0007] Optionally, the device is also used to: obtain the number of scans of the first type of account in the target historical period among the multiple historical period; obtain the number of scan requests of the second type of account in the target historical period; determine the resource transfer discount parameter corresponding to the target account in the current period based on the number of scans of the first type of account in the target historical period and the number of scan requests of the second type of account in the target historical period.
[0008] Optionally, the device is also used to: before determining the resource transfer discount parameter corresponding to the target account in the current time period based on the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period, when the target account is the first type of account and the time when the target account first uses the operation code of the target account instead of the operation code of the second type of account to perform a scanning operation is in the current cycle, determine the target historical time period corresponding to the current time period in the previous cycle, wherein the previous cycle and the current cycle both include N historical time periods, and the arrangement position of the target historical time period in the previous cycle is the same as the arrangement position of the current time period in the current cycle, and N is an integer greater than or equal to 1.
[0009] Optionally, the device is further used to: before determining the resource transfer discount parameter corresponding to the target account in the current time period according to the number of code scanning of the first type of account in the target historical time period and the number of code scanning requests of the second type of account in the target historical time period, when the time when the target account first uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation is in the Pth time period in the current cycle, and the current time period is the Sth time period in the current cycle, obtain the number of code scanning of the first type of account in the target historical time period and the number of code scanning requests of the second type of account in the target historical time period, wherein the target historical time period is the Sth time period in the previous cycle, the time when the first type of account first uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, and the time when the second type of account first requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, and 1≤P≤S≤N.
[0010] Optionally, the device is used to determine the resource transfer discount parameter corresponding to the target account in the current time period based on the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period in the following manner: divide the number of scans of the first type of account in the target historical time period by the number of scan requests of the second type of account in the target historical time period to obtain the resource transfer discount parameter corresponding to the target account in the current time period.
[0011] Optionally, the device is also used for: before determining the resource transfer discount parameter corresponding to the target account in the current time period based on the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period, when the target account is the first type of account and the time when the target account first uses the operation code of the target account instead of the operation code of the second type of account to perform a scanning operation is in the previous cycle, the last historical period in the previous cycle is determined as the target historical period, wherein the previous cycle and the current cycle both include N historical periods, and N is an integer greater than or equal to 1.
[0012] Optionally, the device is further configured to: before determining the resource transfer discount parameter corresponding to the target account in the current time period according to the number of code scanning of the first type of account in the target historical time period and the number of code scanning requests of the second type of account in the target historical time period, when the time when the target account first uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation is in the Pth time period in the previous cycle and the current time period is the Sth time period in the current cycle, obtain the number of code scanning of the first type of account in the target historical time period and the number of code scanning requests of the second type of account in the target historical time period, wherein the target historical time period is the Nth time period in the previous cycle, the time when the first type of account first uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, and the time when the second type of account first requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, and 1≤P≤N, 1≤S≤N.
[0013] Optionally, the device is used to determine the resource transfer discount parameter corresponding to the target account in the current time period according to the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period in the following manner: divide the number of scans of the first type of account in the target historical time period by the number of scan requests of the second type of account in the target historical time period to obtain the resource transfer discount parameter corresponding to the Nth time period in the previous cycle; determine the resource transfer discount parameter corresponding to the target account in the current time period according to the resource transfer discount parameter corresponding to the Nth time period in the previous cycle and the discount progress factor from the Nth time period in the previous cycle to the current time period.
[0014] Optionally, the device is used to determine the resource transfer discount parameter corresponding to the target account in the current period according to the resource transfer discount parameter corresponding to the Nth period in the previous cycle and the discount progress factor from the Nth period in the previous cycle to the current period in the following manner: determine the resource transfer discount parameter corresponding to the target account in the current period by the following formula:
[0015] f P,j+1 =f P,j ·a j~j+1
[0016] Among them, N-P+1≤j≤N-P+S, f P,j=N-P+1 represents the resource transfer discount parameter corresponding to the Nth period in the previous cycle, f P,j+1=N-P+S+1 represents the resource transfer discount parameter corresponding to the target account in the current period, a j~j+1 represents the discount progress factor from the jth period to the j+1th period starting from the Pth period in the previous cycle.
[0017] Optionally, the device is further used to: determine the discount progress factor from the Nth time period in the previous cycle to the current time period by the following formula:
[0018] When j=1,…,N-1
[0019] Among them, f i,j It represents the resource transfer discount parameter corresponding to the account in the i+jth time period that performs a scanning operation for the first time using the operation code of the first type of account instead of the operation code of the second type of account in the i-th time period in the previous cycle.
[0020] Optionally, the device is used to transfer a target quantity of resources from the resource set of the target account according to the resource transfer discount parameter in the following manner: obtain a baseline quantity corresponding to the target account; multiply the baseline quantity by the resource transfer discount parameter to determine the target quantity, where 0<the resource transfer discount parameter<1; and transfer the target quantity of resources from the resource set of the target account.
[0021] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned operation code processing method when running.
[0022] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the processing method of the above operation code.
[0023] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the operation code processing method through the computer program.
[0024] In an embodiment of the present invention, a target operation request triggered by a target operation code of a scanning target account is obtained in a current period in a current cycle. When the target account is a first type of account, a resource transfer discount parameter corresponding to the target account in the current period is obtained, wherein the resource transfer discount parameter is a parameter determined based on the number of scans of the first type of account in a target historical period corresponding to the current period in multiple historical periods and the number of requested scans of the second type of account in the target historical period. The multiple historical periods are historical periods in a previous cycle before the current cycle. The first type of account is an account that uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation. The number of scans is the number of times the operation code of the first type of account is used to replace the operation code of the second type of account to perform a scanning operation. The second type of account is an account that requests the operation code of the first type of account to replace the operation code of the second type of account. An account that uses an operation code to perform a scanning operation, the number of requested scans is the number of times the operation code of the first type of account is requested to be used instead of the operation code of the second type of account to perform a scanning operation, and in response to the target operation request, a target number of resources are transferred from the resource set of the target account according to the resource transfer discount parameter, by obtaining the number of scans and the number of requested scans in the target historical period in multiple historical periods in the previous cycle, and determining the target number of resources to be transferred based on the resource transfer discount parameter according to the number of scans and the number of requested scans in the historical period, thereby achieving the purpose of dynamically determining the resources to be transferred based on historical data, thereby achieving the technical effect of enriching the reward method of the operation code reward system, optimizing the reward rules of the reward system, and facilitating attracting more users to participate in the mutual assistance activities of the operation code, thereby solving the technical problems that the operation code reward system in the related technology is not scientific enough and the reward method is relatively single. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 is a schematic diagram of an application environment of an optional operation code processing method according to an embodiment of the present invention;
[0027] Figure 2 is a flow chart of an optional operation code processing method according to an embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of an optional operation code processing method according to an embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention;
[0030] Figure 5 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention;
[0031] Figure 6 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention;
[0032] Figure 7 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention;
[0033] Figure 8 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention;
[0034] Fig. 9 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention;
[0035] Fig.10 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention;
[0036] Fig.11 is a schematic structural diagram of an optional operation code processing device according to an embodiment of the present invention;
[0037] Fig.12 is a schematic diagram of the structure of an optional operation code processing product according to an embodiment of the present invention;
[0038] Fig.13 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0042] QR code for ride: A small program with a QR code for public transportation such as buses and subways.
[0043] Mutual-aid ride code: A ride code that is generated quickly by adding the second passenger's identity ID into the ride code applet on the first mobile terminal, and the ride code backend management system integrates the input identity ID with the ride code template.
[0044] Mutual ride: The second passenger enters the second passenger’s identity ID in the first passenger’s mobile device ride code applet, generates a new ride code, and scans the code to board the ride.
[0045] Reward and Punishment System: A method used to distinguish different levels of mutual assistance. It gives discounts to assisting parties based on the number of mutual assistance they provide. The more mutual assistance, the greater the discount, and the less mutual assistance, the less discount.
[0046] Non-parametric estimation: refers to a series of methods that directly use the prior knowledge of learning samples of known categories to perform statistical tests and judgment analyses without considering the original population distribution or making assumptions about parameters.
[0047] Parameter estimation: the process of estimating unknown parameters in a population distribution based on random samples drawn from the population. From the perspective of estimation form, it can be divided into point estimation and interval estimation: from the perspective of the method of constructing estimators, there are moment method estimation, least squares estimation, likelihood estimation, Bayesian estimation, etc.
[0048] The present invention will be described below in conjunction with embodiments:
[0049] According to one aspect of an embodiment of the present invention, a method for processing an operation code is provided. Optionally, in this embodiment, the method for processing the operation code can be applied to Figure 1In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1 As shown, the server 101 is connected to the terminal 103 through a network, and can be used to provide services for the terminal device or the application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 can be set on the server or independently of the server to provide data storage services for the server 101, for example, an operation code data storage server. The above network can include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The terminal device 103 can be a terminal configured with an application, and can include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a vehicle-mounted terminal, a smart TV and other computer devices. The above server can be a single server, or a server cluster composed of multiple servers, or a cloud server. The application 107 using the above operation code processing method is displayed through the terminal device 103.
[0050] Combination Figure 1 As shown, the above operation code processing method can be implemented in the terminal device 103 through the following steps:
[0051] S1, obtaining a target operation request triggered by a target operation code of a target account on a scanning terminal device 103 in a current period of a current cycle;
[0052] S2, when the target account is a first type account, obtain a resource transfer discount parameter corresponding to the target account in the current time period, wherein the resource transfer discount parameter is a parameter determined based on the number of scan code scans of the first type account in the target historical time period corresponding to the current time period in multiple historical time periods and the number of scan code requests of the second type account in the target historical time period, the multiple historical time periods are historical time periods in a previous cycle before the current cycle, the first type account is an account that uses the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, the number of scan code scans is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation, the second type account is an account that requests to use the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, and the number of scan code requests is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation;
[0053] S3, in response to the target operation request, transferring a target amount of resources from the resource set of the target account logged in on the terminal device 103 according to the resource transfer discount parameter.
[0054] Optionally, in this embodiment, the above operation code processing method can also be implemented by a server, for example, Figure 1 It is implemented in the server 101 shown; or it is implemented by the user terminal and the server together.
[0055] The above is only an example and is not specifically limited in this embodiment.
[0056] Optionally, as an optional implementation, as Figure 2 As shown, the processing method of the above operation code includes:
[0057] S202, obtaining a target operation request triggered by a target operation code of a scanning target account in a current period of a current cycle;
[0058] S204, when the target account is a first type account, obtain a resource transfer discount parameter corresponding to the target account in the current time period, wherein the resource transfer discount parameter is a parameter determined based on the number of scan code scans of the first type account in the target historical time period corresponding to the current time period in multiple historical time periods and the number of scan code requests of the second type account in the target historical time period, the multiple historical time periods are historical time periods in a previous cycle before the current cycle, the first type account is an account that uses the operation code of the first type account to replace the operation code of the second type account to perform a scan operation, the number of scan code scans is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scan operation, the second type account is an account that requests to use the operation code of the first type account to replace the operation code of the second type account to perform a scan operation, and the number of scan code requests is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scan operation;
[0059] S206 , in response to the target operation request, transferring a target amount of resources from the resource set of the target account according to the resource transfer discount parameter.
[0060] Optionally, in this embodiment, the application scenarios of the above-mentioned operation code processing method may include but are not limited to operation code processing in various application scenarios such as medical care, finance, credit reporting, banking, government affairs, government, energy, education, security, buildings, games, transportation, Internet of Things, and industry.
[0061] Specifically, it can include but is not limited to application scenarios such as scanning QR codes to take buses and subways.
[0062] At present, the ride code has been widely used in people's daily public transportation, bringing great convenience to people's travel. However, when people use the ride code to take a ride, they often encounter some troubles, such as: the mobile terminal has no power, the mobile terminal is down, the ride code cannot be swiped, and the mobile terminal device such as the mobile phone is forgotten, which also brings great inconvenience to people.
[0063] However, the related art only provides a solution to help passengers without means of transportation to take a bus, that is, after the second type of account generates a help message in the smart terminal, it is sent to the cloud server through the cloud network. After the cloud server receives the help request, it sends it to the terminal device of the first type of account through the network. After receiving the request, the terminal device of the first type of account selects the help request. This solution requires that the help-seeker (the second type of account) and the recipient (the first type of account) are both online at the same time, and can broadcast and communicate through network devices. And it cannot solve the problem of the first passenger's inconvenience in taking a bus due to the inability of the mobile terminal to connect to the Internet due to problems such as lack of power on the mobile terminal, mobile terminal downtime, inability to swipe the boarding code, forgetting to bring the mobile phone, etc.
[0064] Based on this, the embodiment of the present application provides an operation code processing method to solve the above problems and improve the user's travel experience. In the embodiment of the present application, after entering the ID information of the second type of account (such as mobile phone number, WeChat number, QQ number, etc., where the user ID is connected with the ride code system and the bank payment system) in the ride payment interface of the first type of account (displaying the ride code of the first type of account), the ride code background system generates the ride code of the second type of account, and the first type of account uses the generated mutual aid ride code (i.e., the ride code of the second type of account) to help the second type of account take the ride. After that, the background system connects the ride code and payment system of the second type of account (the party seeking help) through the network based on the mutual aid ride code, and deducts the ride fee of the second type of account. After the fee is successfully deducted, the background system will send the deduction information to the first type of account through WeChat, SMS, etc. At the same time, the background system will send the fare discount (corresponding to the aforementioned resource transfer discount parameter) to the first type of account's ride code system through the reward and punishment system, and combine the fare of the first type of account for this ride with the resource transfer discount parameter obtained from the reward information to generate the actual fee required for this ride by the first type of account, and settle the account with the actual fee.
[0065] Next, the operation code processing method provided in the embodiment of the present application is described from the product side. Figure 3 , Figure 3It is a schematic diagram of an optional operation code processing method according to an embodiment of the present invention, in which a mutual aid ride function entrance is presented in the ride payment interface of the first type of account (displaying the ride code of the first type of account), namely "Mutual aid ride, please enter passenger ID", and a confirmation function item "OK" associated with the mutual aid ride function entrance is presented, and the user can enter the ID information of the second type of account in the mutual aid ride function entrance, such as mobile phone number, ID card number, etc. After the user enters the ID information based on the mutual aid ride function entrance, if a trigger operation (such as a click operation) is received for the confirmation function item "OK", the ride code background system generates a ride code for the second type of account (i.e., the mutual aid ride code) and displays it in the ride payment interface, so as to realize the ride payment for the second type of account based on the ride code of the second type of account. At this time, the number of scans for the above-mentioned first type of account is increased by one, and the number of scans is the number of times the operation code of the first type of account is used instead of the operation code of the second type of account to perform the scanning operation. The number of requested scans for the second type of account is increased by one, and the number of requested scans is the number of times the operation code of the first type of account is used instead of the operation code of the second type of account to perform the scanning operation.
[0066] Above Figure 3 It shows a method for determining the number of scans for the first type of account and the number of scan requests for the second type of account, which may include but is not limited to separately obtaining the number of scans and the number of scan requests for each historical period in multiple historical periods, so as to obtain the number of scans for the first type of account in the target historical period corresponding to the current period in the above multiple historical periods and the number of scan requests for the second type of account in the target historical period.
[0067] and Figure 4 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention, such as Figure 4 As shown, the above operation code processing method also includes the following steps on the product side:
[0068] The target account is a first type account, that is, before May 2021, the target account had assisted other second type accounts in scanning code operations. At this time, when the target account took the bus in May 2021, it used its own target operation code to complete the entry scan, and after arriving at the destination, it completed the exit scan through its own target operation code. At this time, the server generates a target operation request based on the target account's riding distance, where the above-mentioned target operation request includes the number of virtual resources that need to be transferred for the current ride, for example, the fare is 10 yuan. After the server determines that the target account is a first type account, it obtains the resource transfer discount parameters (discount rate: 60%) of the target historical period (May 2020) corresponding to the current period (May 2021), and determines that the actual fare to be deducted is 10×60%=6 yuan according to the resource transfer discount parameters, and transfers the target amount of resources (6 yuan) from the resource set of the target account.
[0069] The above is only an example, and this embodiment does not make any specific limitation.
[0070] and Figure 5 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention, such as Figure 5 As shown, the above operation code processing method also includes the following steps on the technical side:
[0071] The first passenger assists the second passenger in scanning the boarding code through the first passenger's mobile terminal. The boarding code background payment system deducts the second passenger's fee and sends the information of the second passenger's successful fee deduction to the boarding code discount system. The boarding code discount system calculates the discount rate and determines the fee to be deducted from the first passenger based on the discount rate, and finally deducts the first passenger's fee. Among them, the above-mentioned first passenger is the above-mentioned first type account, and the second passenger is the above-mentioned second type account.
[0072] Specifically, the overall process of this solution can be divided into the following four modules: mobile terminal module, ride code backend management system module, ride code backend payment system module, and ride code discount system module. The specific functions of each module are as follows:
[0073] (1) Mobile terminal module. The mobile terminal module is mainly used for the front-end page of the ride code applet and to collect the face and ID information of the first passenger and the second passenger through the ride code applet, and to transmit the collected information back to the ride code backend management system; and to receive the ride code (or fused ride code) generated by the ride code backend management system; when a new ride code is received, the new ride code is displayed on the mobile terminal and scanned on the ride code scanner.
[0074] (2) Boarding code backend management system module. The main function of this module is to receive the face and ID information of the first and second passengers sent back by the mobile terminal, perform encryption fusion, generate a new boarding code (or fused boarding code), and send the new boarding code (or fused boarding code) back to the mobile terminal module.
[0075] (3) The boarding code backend payment system module. The main function of this module is to receive the information after the mobile terminal scans the boarding code scanner and decode the ID information of the first passenger and the second passenger. This module provides the payment information function of the passenger's ID information and the bank. After the code is scanned successfully, the second passenger's fare is deducted first, and then the deduction success information is returned to the boarding code backend discount system; and the deducted fee information of the second passenger is returned to the second passenger's bank system device (mobile terminal). At the same time, after confirming the first passenger's discount fare, the module deducts the first passenger's fare and returns the deduction information to the first passenger's bank system device (mobile terminal).
[0076] (4) The backend discount system module of the ride code. This module is mainly used to calculate the discounted fare for the first passenger. Based on the deduction information of the second passenger, the module counts the number of times the first passenger successfully provides assistance, constructs the upper left triangular matrix of the first passenger's assistance progress, and constructs the upper left triangular matrix of the second passenger's help progress based on the number of times the second passenger asks for help. And based on the upper left triangular matrix of the first passenger's assistance progress and the upper left triangular matrix of the second passenger's help progress, a discount rate matrix based on the number of successful assistance provided and its corresponding progress factor for each month is constructed, thereby constructing a complete discount rate for each month. This module combines the discount rate with the original ride fare to obtain the discounted fare for the first passenger. And the fare is returned to the backend payment system. After receiving the discounted fare for the first passenger, the backend payment system deducts the fare for the first passenger and returns the deduction information to the first passenger's bank system device (mobile terminal).
[0077] Optionally, in this embodiment, the above-mentioned current cycle may include but is not limited to the time period for triggering the target operation request using the target operation code. For example, if the date of obtaining the target operation request is May 2021, then the current cycle is 2021, and the current period is May. The intervals between the above-mentioned cycles and the intervals between the time periods can be preset by the system. For example, every 12 months is a cycle, and each month is a time period. Then the above-mentioned multiple historical time periods are the historical time periods in the previous cycle before the current cycle. Taking the current cycle as 2021 as an example, the previous cycle is 2020, and the multiple historical time periods are January to December 2020.
[0078] Optionally, in this embodiment, the target account is the account logged in by the terminal currently using the operation code processing method. The target account may include but is not limited to an account that performs scanning operations on behalf of other second-type accounts in a historical period, or an account that does not perform scanning operations on behalf of other second-type accounts in a historical period but performs scanning operations on behalf of other second-type accounts in a period before the current period in the current cycle.
[0079] For example, taking the current cycle as 2021 and the current period as May, the target accounts may include but are not limited to accounts that perform scanning operations on behalf of other second-type accounts in 2022 (the previous cycle of the current cycle) or accounts that perform scanning operations on behalf of other second-type accounts from January to May 2021.
[0080] It should be noted that, as long as the account has performed a scanning operation on behalf of other second-type accounts before obtaining the target operation request, the account is the first-type account.
[0081] Optionally, in this embodiment, the above-mentioned target operation code may include but is not limited to QR codes used in scenarios such as riding, watching movies, visiting scenic spots, and paying. The above-mentioned QR codes may include but are not limited to rectangular QR codes, circular QR codes, etc.
[0082] Optionally, in this embodiment, the above-mentioned resource transfer discount parameters can be determined based on the number of scans of the first type of account in the target historical period corresponding to the current period in multiple historical time periods and the number of requested scans of the second type of account in the target historical period. Specifically, it can include but is not limited to determining multiple resource transfer discount parameters corresponding to multiple historical time periods, and corresponding the multiple resource transfer discount parameters to multiple time periods in the current cycle.
[0083] For example, while Figure 6 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention, such as Figure 6 As shown, multiple resource transfer discount parameters are generated according to the number of scans of the first type of account and the number of scan requests of the second type of account in multiple historical time periods, each resource transfer discount parameter corresponds to a historical time period, and when the target account obtains a target operation request in the current time period, the resource transfer discount parameter associated with the target historical time period corresponding to the current time period is queried, and the target number of resources is transferred from the resource set of the target account according to the resource transfer discount parameter.
[0084] Specifically, taking the current cycle as 2021 and the current period as May as an example, when the first type of account uses the operation code of the first type of account instead of the operation code of the second type of account to perform an overscan operation before May 2020, the target amount of resources will be transferred from the resource set of the target account using the resource transfer discount parameter (f5) corresponding to May 2020.
[0085] Optionally, in this embodiment, the above-mentioned number of scans is the number of times the operation code of the first type of account is used instead of the operation code of the second type of account to perform a scanning operation, and may include but is not limited to the number of times all first type accounts (not limited to the target account) replace the second type of account to perform a scanning operation. For example, if account A and account B have both assisted the second type of account in performing a scanning operation in the previous cycle of the current cycle, they are both counted as the above-mentioned number of scans.
[0086] For example, Figure 7 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention, such as Figure 7 As shown, each row represents the time period when the first type of account assists the second type of account to perform the code scanning operation for the first time in the previous cycle, and each column represents the relative time period corresponding to the first time when the first type of account assists the second type of account to perform the code scanning operation in the previous cycle, for example, m 11 For example, it means the number of times the first type of account assisted the second type of account to perform the code scanning operation for the first time in January in the previous cycle in the first month (January), m 12 This means the number of times the first type of account assisted the second type of account in scanning code operation for the first time in January in the previous cycle in scanning code number in the second month (February), m 22 This means the number of times the first type of account assisted the second type of account in scanning code operations for the first time in February of the previous cycle in scanning code operations in the second month (February). Figure 7 The m in the upper right corner 1,12 This means the number of times the first type of account assisted the second type of account in scanning code operation for the first time in January of the previous cycle in scanning code number in the 12th month (December). Figure 7 m in the lower left corner 11,2 It means the number of times the first type of account assisted the second type of account to perform the code scanning operation for the first time in November in the previous cycle in the second month (December). In other words, Figure 7 As shown from m 121 To m 112 The diagonal line shows the number of scans performed in December by the first type of accounts that assisted the second type of accounts in performing scan operations for the first time from January to December in the previous cycle.
[0087] It should be noted that Figure 7Shown is the upper left triangular matrix of the aforementioned first passenger assistance progress.
[0088] Optionally, in this embodiment, the above-mentioned number of scan code requests is the number of times the second type of account requests to use the operation code of the first type of account instead of the operation code of the second type of account to perform a scanning operation, and may include but is not limited to the number of times all second type accounts request to use the first type of account instead of the second type of account to perform a scanning operation. For example, if account A and account B both requested assistance from the first type of account to perform a scanning operation in the previous cycle of the current cycle, they are both counted as the above-mentioned number of scan code requests.
[0089] For example, Figure 8 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention, such as Figure 8 As shown, each row represents the time period when the second type account first requested to assist the first type account to perform the code scanning operation in the previous cycle, and each column represents the relative time period corresponding to the first request to assist the first type account to perform the code scanning operation in the previous cycle. For example, n 11 For example, it means the number of times the second type of account requested to assist the first type of account to perform the code scanning operation in January in the previous cycle in the first month (January), n 12 This means the number of times the second type of account requested to assist the first type of account to perform a code scanning operation in January in the previous cycle in the second month (February), n 22 This means the number of times the second type of account requested to assist the first type of account to perform the code scanning operation in February in the previous cycle in the second month (February). Figure 8 n in the upper right corner 1,12 This means the number of times the second type of account requested to assist the first type of account to perform the code scanning operation for the first time in January of the previous cycle in the 12th month (December). Figure 8 The n in the lower left corner is shown 11,2 This means the number of times the second type of account requested to assist the first type of account to perform the code scanning operation in November in the previous cycle in the second month (December). In other words, Figure 8 Shown from n 121 to n 112 The diagonal line represents the number of times the second type of accounts requested to assist the first type of accounts in performing code scanning operations for the first time from January to December in the previous cycle and requested to scan the code in December.
[0090] It should be noted that Figure 8 Shown is the upper left triangular matrix of the second passenger's request for help.
[0091] Optionally, in this embodiment, the resource transfer discount parameter can be based on the above Fig. 9 and Figure 8 The number of scans shown and the number of scans requested are determined. For example, Fig. 9 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention, such as Fig. 9 As shown, each row represents the time period when the first type of account assists the second type of account to perform the code scanning operation for the first time in the previous cycle, and each column represents the relative time period corresponding to the first time the first type of account assists the second type of account to perform the code scanning operation in the previous cycle. f represents the resource transfer discount parameter corresponding to the first type of account in the corresponding time period. For example, f 11 For example, it means the resource transfer discount parameter of the first type of account that assisted the second type of account to perform the code scanning operation for the first time in January of the previous cycle in the first month (January) of the current cycle, f 12 This means that the resource transfer discount parameter for the first type of account that assisted the second type of account in scanning the QR code for the first time in January of the previous cycle in the second month (February) of the current cycle is, 22 This means that the resource transfer discount parameter for the first type of account that assisted the second type of account in performing the code scanning operation for the first time in February of the previous cycle in the second month (February) of the current cycle is Fig. 9 The f in the upper right corner shown 1,12 This means that the resource transfer discount parameter for the first type of account that assisted the second type of account in scanning code operation for the first time in January of the previous cycle in the 12th month (December) of the current cycle is Fig. 9 f in the lower left corner shown 11,2 This means that the first type of account that assisted the second type of account in scanning the QR code for the first time in November of the previous cycle will receive a resource transfer discount parameter in the second month (December) of the current cycle. In other words, Fig. 9 As shown from f 121 to f 112 The diagonal line represents the resource transfer discount parameters in December of the current cycle for the first type of account that assisted the second type of account in performing the code scanning operation for the first time from January to December in the previous cycle.
[0092] Specifically, the above f ij =m ij / n ij (i=1, ..., 12; j=1, ..., 12), where i represents the number of rows, j represents the number of columns, and m represents the number of columns. ij With n ijThey respectively represent the number of times that the first type account that assisted the second type account for the first time in the i-th month used the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation in the j-th month, and the number of times that the second type account that requested to assist the first type account for the first time in the i-th month requested to use the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation in the j-th month, and are represented by m ij With n ij The resource transfer discount parameter is determined by the ratio of , so as to ultimately transfer the target amount of resources from the resource set of the target account.
[0093] Through this embodiment, a target operation request triggered by a target operation code of a scanning target account is obtained in a current period in a current cycle. When the target account is a first type of account, a resource transfer discount parameter corresponding to the target account in the current period is obtained, wherein the resource transfer discount parameter is a parameter determined based on the number of scans of the first type of account in a target historical period corresponding to the current period in multiple historical periods and the number of requested scans of the second type of account in the target historical period. The multiple historical periods are historical periods in a previous cycle before the current cycle. The first type of account is an account that uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation. The number of scans is the number of times the operation code of the first type of account is used to replace the operation code of the second type of account to perform a scanning operation. The second type of account is an account that requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation. The number of requested scans is the number of times the first type of account is requested to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation. The operation code of the first type of account replaces the operation code of the second type of account to perform the scanning operation times, responds to the target operation request, and transfers the target number of resources from the resource set of the target account according to the resource transfer discount parameter. The target number of resources to be transferred is determined by obtaining the number of scans and the number of requested scans in the target historical period in multiple historical periods in the previous cycle, and determining the resource transfer discount parameter according to the number of scans and the number of requested scans in the historical period, thereby achieving the purpose of dynamically determining the resources to be transferred according to historical data, thereby enriching the reward method of the operation code reward system, optimizing the reward rules of the reward system, and using the number of requests for help from the requester (second type of account) and the number of assists from the assister (first type of account) each month to construct a 12*12 order upper left corner matrix of the number of second type account request scans and the upper left corner matrix of the number of first type account scans, and constructing a discount rate upper left corner matrix based on the two matrices, and then generating a discount rate table for each month. The actual target number of resources to be transferred from the target account is calculated based on the discount rate table and the estimated number of resources to be transferred from the target account. The non-parametric estimation method is used to effectively solve the problem of not being able to use parameter estimation due to insufficient sample data in the initial stage of the product. This can achieve the technical effect of attracting more users to participate in the mutual assistance activities of the operation code, and further solve the technical problems in the related technology that the operation code reward system is not scientific enough and the reward method is relatively single.
[0094] As an optional solution, the method further includes:
[0095] Obtain the number of times a first type of account has scanned a code in a target historical period among multiple historical periods;
[0096] Get the number of code scanning requests from the second type of account during the target historical period;
[0097] The resource transfer discount parameter corresponding to the target account in the current period is determined according to the number of code scanning times of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period.
[0098] Optionally, in this embodiment, the target historical period includes the historical period corresponding to the current period among the multiple historical periods. For example, if the current period is 2021, the multiple historical periods may include but are not limited to January to December 2020, a total of 12 historical periods. If the current period is May, the target historical period is May 2020.
[0099] Optionally, in this embodiment, the resource transfer discount parameter corresponding to the target account in the current time period can be determined based on the number of scans of the first type of account and the number of scans requested by the second type of account in the target historical time period. Specifically, it can include but is not limited to determining the ratio of the number of scans of the first type of account to the number of scans requested by the second type of account as the resource transfer discount parameter. It can also include but is not limited to combining the sum or difference of the number of scans of the first type of account and the number of scans requested by the second type of account with a preset coefficient to obtain the resource transfer discount parameter.
[0100] As an optional solution, before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of scans of the first type of account in the target historical period and the number of scan requests of the second type of account in the target historical period, the method further includes:
[0101] When the target account is a first type of account and the time when the target account first uses the target account's operation code instead of the second type of account's operation code to perform a scanning operation is in the current cycle, a target historical time period corresponding to the current time period is determined in the previous cycle, wherein the previous cycle and the current cycle both include N historical time periods, and an arrangement position of the target historical time period in the previous cycle is the same as an arrangement position of the current time period in the current cycle, and N is an integer greater than or equal to 1.
[0102] Optionally, in this embodiment, the above-mentioned target account is a first type of account, and the time when the target account uses the target account's operation code instead of the second type of account's operation code to perform a scanning operation for the first time is in the current cycle, which may include but is not limited to the cycle in which the target operation request triggered by the target account is in the same cycle as the cycle corresponding to the time when the target account uses the target account's operation code instead of the second type of account's operation code to perform a scanning operation for the first time. For example, if the cycle of obtaining the target operation request triggered by the target operation code of the scanning target account is 2021, then when the time when the target account uses the target account's operation code instead of the second type of account's operation code to perform a scanning operation for the first time is also in 2021, then it is considered that the time when the target account uses the target account's operation code instead of the second type of account's operation code to perform a scanning operation for the first time is in the current cycle.
[0103] Optionally, in this embodiment, the above-mentioned determination of the target historical period corresponding to the current period in the previous cycle may include but is not limited to determining the corresponding target historical period from multiple historical periods in the previous cycle of the current cycle. For example, when the cycle of obtaining the target operation request triggered by the target operation code of the target account to scan is 2021, when the time when the target account first uses the operation code of the target account to replace the operation code of the second type account to perform the scanning operation is in the current cycle, the current cycle is 2021, then the previous cycle is 2020, and when the current period is May, then the target historical period is May 2020.
[0104] Optionally, in this embodiment, the previous cycle and the current cycle both include N historical time periods, which may include but are not limited to being calculated based on years as a cycle, that is, N=12, being calculated based on months as a cycle, that is, N=30, and being calculated based on weeks as a cycle, that is, N=7. The arrangement position of the above-mentioned target historical time period in the previous cycle is the same as the arrangement position of the current time period in the current cycle, which may include but is not limited to the current time period May being ranked 5th in the current cycle of 2021, then the target historical time period is May of the previous cycle of 2020, which is ranked 5th, and N is an integer greater than or equal to 1.
[0105] As an optional solution, before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of scans of the first type of account in the target historical period and the number of scan requests of the second type of account in the target historical period, the method further includes:
[0106] When the time when the target account uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation for the first time is in the Pth time period in the current cycle, and the current time period is the Sth time period in the current cycle, the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period are obtained, wherein the target historical time period is the Sth time period in the previous cycle, the time when the first type of account uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation for the first time in the previous cycle is in the Pth time period in the previous cycle, and the time when the second type of account requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation for the first time in the previous cycle is in the Pth time period in the previous cycle, and 1≤P≤S≤N.
[0107] Optionally, in this embodiment, the Pth time period in the current cycle may include but is not limited to the Pth time period in the current cycle arranged in a certain order. For example, taking the cycle as a year, the Pth time period is the Pth month. The current time period is the Sth time period in the current cycle and may include but is not limited to the Sth time period in the current cycle arranged in a certain order. For example, taking the cycle as a year, the Sth time period is the Sth month.
[0108] For example, the first time the target account uses the target account's operation code to replace the second type account's operation code to perform a scanning operation is in May 2021, and N=12, then the Pth time period in the current cycle is May, and the current time period is August, then the Sth time period in the current cycle is August. At this time, 1<5<8<12, then the target historical time period is August 2020, and the first time the first type of account uses the first type of account's operation code to replace the second type account's operation code to perform a scanning operation in the previous cycle is in May 2020. The first time the second type of account requests to use the first type of account's operation code to replace the second type account's operation code to perform a scanning operation in the previous cycle is in May 2020, that is, the number of scans of the first type of account in May 2020 and the number of scan requests of the second type account in the target historical time period are obtained.
[0109] As an optional solution, according to the number of code scanning of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period, the resource transfer discount parameter corresponding to the target account in the current period is determined, including:
[0110] The number of code scans by the first type of account in the target historical period is divided by the number of code scan requests by the second type of account in the target historical period to obtain the resource transfer discount parameter corresponding to the target account in the current period.
[0111] Optionally, in this embodiment, the number of scans of the first type of account in the above-mentioned target historical period divided by the number of requested scans of the second type of account in the target historical period may include but is not limited to using the number of scans in the same target historical period divided by the number of requested scans to obtain the resource transfer discount parameter of the current period corresponding to the target historical period.
[0112] For example, using the number of scans and scan requests in May 2020, divide the number of scans in May 2020 by the number of scan requests in May 2020, and the value is May 2021 as the resource transfer discount parameter for the current period.
[0113] As an optional solution, before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of scans of the first type of account in the target historical period and the number of scan requests of the second type of account in the target historical period, the method further includes:
[0114] When the target account is a first type of account and the time when the target account first uses the target account's operation code instead of the second type of account's operation code to perform a scanning operation is in the previous cycle, the last historical period in the previous cycle is determined as the target historical period, where the previous cycle and the current cycle both include N historical periods, and N is an integer greater than or equal to 1.
[0115] Optionally, in this embodiment, the target account is a first type of account, and the time when the target account first uses the target account's operation code instead of the second type of account's operation code to perform a scanning operation is in the previous cycle, which may include but is not limited to the target account being a first type of account that assists a second type of account for the first time in the previous cycle. At this time, the last historical period in the previous cycle is determined as the target historical period to obtain the above-mentioned resource transfer discount parameter.
[0116] For example, the current time is May 2021, and the first time account A assisted the second type of account was March 2020. At this time, for account A, the above target historical period is the last historical period of 2021, that is, December 2021.
[0117] In other words, when both the previous cycle and the current cycle include N historical periods, the target historical period is the Nth historical period of the previous cycle.
[0118] As an optional solution, before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of scans of the first type of account in the target historical period and the number of scan requests of the second type of account in the target historical period, the method further includes:
[0119] When the time when the target account first uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation is in the Pth time period in the previous cycle, and the current time period is the Sth time period in the current cycle, the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period are obtained, wherein the target historical time period is the Nth time period in the previous cycle, the time when the first type of account first uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, and the time when the second type of account first requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, 1≤P≤N, 1≤S≤N.
[0120] Optionally, in this embodiment, the Pth time period in the previous cycle may include but is not limited to the Pth time period in the previous cycle arranged in a certain order. For example, taking the cycle as a year, the Pth time period is the Pth month. The current time period is the Sth time period in the current cycle and may include but is not limited to the Sth time period in the current cycle arranged in a certain order. For example, taking the cycle as a year, the Sth time period is the Sth month.
[0121] For example, the first time the target account used the target account's operation code to replace the second type account's operation code to perform a scanning operation was in May 2020, and N=12, then the Pth time period in the previous cycle was May, and the current time period was August, then the Sth time period in the current cycle was August. At this time, 1<5<12, and 1<8<12, then the target historical time period was December 2020 (the Nth time period), and the first time the first type account used the first type account's operation code to replace the second type account's operation code to perform a scanning operation in the previous cycle was in May 2020, and the first time the second type account requested to use the first type account's operation code to replace the second type account's operation code to perform a scanning operation in the previous cycle was in May 2020, that is, the number of scans of the first type account in May 2020 and the number of scan requests of the second type account in the target historical time period were obtained.
[0122] As an optional solution, according to the number of code scanning of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period, the resource transfer discount parameter corresponding to the target account in the current period is determined, including:
[0123] The number of code scanning times of the first type of account in the target historical period is divided by the number of code scanning requests of the second type of account in the target historical period, to obtain the resource transfer discount parameter corresponding to the Nth period in the previous cycle;
[0124] The resource transfer discount parameter corresponding to the Nth time period in the previous cycle and the discount progress factor from the Nth time period in the previous cycle to the current time period are determined for the target account in the current time period.
[0125] Optionally, in this embodiment, after obtaining the resource transfer discount parameter corresponding to the Nth time period in the previous cycle, the resource transfer discount parameter corresponding to the target account in the current time period can be determined based on the discount progress factor from the Nth time period in the previous cycle to the current time period. The above discount progress factor is a progress factor obtained by non-parametric estimation, specifically, it can be expressed as a progress factor from the jth time period to the j+1th time period.
[0126] As an optional solution, according to the resource transfer discount parameter corresponding to the Nth period in the previous cycle and the discount progress factor from the Nth period in the previous cycle to the current period, the resource transfer discount parameter corresponding to the target account in the current period is determined, including:
[0127] The resource transfer discount parameter corresponding to the target account in the current period is determined by the following formula:
[0128] f P,j+1 =f P,j ·a j~j+1
[0129] Among them, N-P+1≤j≤N-P+S, f P,j=N-P+1 represents the resource transfer discount parameter corresponding to the Nth period in the previous cycle, f P,j+1=N-P+S+1 Indicates the resource transfer discount parameter corresponding to the target account in the current period, a j~j+1 Represents the discount progress factor from the jth period to the j+1th period starting from the Pth period in the previous cycle.
[0130] As an optional solution, the method further includes:
[0131] The discount progression factor from the Nth period in the previous cycle to the current period is determined by the following formula:
[0132] When j=1,…,N-1
[0133] Among them, f i,jIt represents the resource transfer discount parameter corresponding to the account in the i+jth time period that performs a scanning operation for the first time using the operation code of the first type of account instead of the operation code of the second type of account in the i-th time period in the previous cycle.
[0134] For example, Fig.10 is a schematic diagram of another optional operation code processing method according to an embodiment of the present invention, such as Fig.10 As shown, the processing method of the above operation code may include but is not limited to determining the discount progress factor from the Nth period in the previous cycle to the current period in the following manner:
[0135] Taking i=1, j=1 as an example, the above formula represents the discount progression factor from the first period to the second period starting from the first period in the previous cycle, which is calculated by the summation formula Fig.10 The sum of the actual resource transfer discount parameters calculated based on the number of scans and requested scans in the previous period in the second column is used as the first value. Fig.10 The sum of the actual resource transfer discount parameters calculated according to the number of scans and the number of requested scans in the historical time periods in the previous cycle in the first column is taken as the second value. The first value is divided by the second value to obtain the discount progress factor from the first time period to the second time period starting from the first time period.
[0136] At this time, f 121 ×a 1~2 You can get the above As the resource transfer discount parameter corresponding to the second period starting from the 12th period in the previous cycle, if the current period is February, then for the first type of account that assisted the second type of account for the first time in the 12th period in the previous cycle, the resource transfer discount parameter used when the current time is February is the above estimated
[0137] The above is only an example, and this embodiment does not make any specific limitation.
[0138] As an optional solution, transfer the target amount of resources from the resource collection of the target account according to the resource transfer discount parameters, including:
[0139] Get the benchmark quantity corresponding to the target account;
[0140] The product of the benchmark quantity and the resource transfer discount parameter is determined as the target quantity, where 0<resource transfer discount parameter<1;
[0141] Transfer the target amount of resources from the target account's resource collection.
[0142] Optionally, in this embodiment, the above-mentioned benchmark quantity may include but is not limited to being determined according to relevant information involved in the target operation request.
[0143] Taking the above-mentioned target operation code as a ride code as an example, the above-mentioned target operation request includes the starting point and the end point of the trip, then the base fare required for the target account in the current period of the current cycle can be determined according to the starting point and the end point, that is, the above-mentioned base fare is an example of the above-mentioned base amount.
[0144] At this time, the resource transfer discount parameter for the current period is obtained, and the product of the base quantity and the resource transfer discount parameter is determined as the target quantity, and the target quantity of resources is transferred from the resource set of the target account.
[0145] The present application is further explained below in conjunction with specific embodiments:
[0146] The overall process of this solution can be divided into the following four modules: mobile terminal module, ride code backend management system module, ride code backend payment system module, and ride code discount system module. The specific functions of each module are as follows:
[0147] (1) Mobile terminal module. The mobile terminal module is mainly used for the front-end page of the ride code applet and to collect the face and ID information of the first passenger and the second passenger through the ride code applet, and to transmit the collected information back to the ride code backend management system; and to receive the ride code (or fused ride code) generated by the ride code backend management system; when a new ride code is received, the new ride code is displayed on the mobile terminal and scanned on the ride code scanner.
[0148] (2) Boarding code backend management system module. The main function of this module is to receive the face and ID information of the first and second passengers sent back by the mobile terminal, perform encryption fusion, generate a new boarding code (or fused boarding code), and send the new boarding code (or fused boarding code) back to the mobile terminal module.
[0149] (3) The boarding code backend payment system module. The main function of this module is to receive the information after the mobile terminal scans the boarding code scanner and decode the ID information of the first passenger and the second passenger. This module provides the payment information function of the passenger's ID information and the bank. After the code is scanned successfully, the second passenger's fare is deducted first, and then the deduction success information is returned to the boarding code backend discount system; and the deducted fee information of the second passenger is returned to the second passenger's bank system device (mobile terminal). At the same time, after confirming the first passenger's discount fare, the module deducts the first passenger's fare and returns the deduction information to the first passenger's bank system device (mobile terminal).
[0150] (4) The backend discount system module of the ride code. This module is mainly used to calculate the discounted fare for the first passenger. Based on the deduction information of the second passenger, the module counts the number of times the first passenger successfully provides assistance, constructs the upper left triangular matrix of the first passenger's assistance progress, and constructs the upper left triangular matrix of the second passenger's help progress based on the number of times the second passenger asks for help. And based on the upper left triangular matrix of the first passenger's assistance progress and the upper left triangular matrix of the second passenger's help progress, a discount rate matrix based on the number of successful assistance provided and its corresponding progress factor for each month is constructed, thereby constructing a complete discount rate for each month. This module combines the discount rate with the original ride fare to obtain the discounted fare for the first passenger. And the fare is returned to the backend payment system. After receiving the discounted fare for the first passenger, the backend payment system deducts the fare for the first passenger and returns the deduction information to the first passenger's bank system device (mobile terminal).
[0151] Discount system building blocks technical process
[0152] The technical process of the discount system construction module includes four stages: data collection stage, construction of the first passenger assistance progress upper left triangular matrix and the second passenger help progress upper left triangular matrix, discount rate matrix construction stage, discount rate progress factor and discount rate table construction stage, and discount cost matrix construction stage.
[0153] Step 1, data collection stage. Input the number of new first passengers (assistants) collected by the backend management system of the ride code each month, the number of times the new first passengers successfully provided ride assistance each month from the month of addition to the current month {m ij |i=0, ..., 11; j=1, ..., 12}, the number of new second passengers (ride requesters) collected by the ride code backend management system each month, the number of ride requests sent by new second passengers each month from the new month to the current month {n ij |i=0,...,11;j=1,...,12}. Among them, n ij represents the number of times the second passenger in the i-th month sends a ride request in the j-th month, i represents the mark of the second passenger in the i-th month, j represents the number mark of the j-th month, and m ij It indicates the number of times the first passenger added in the i-th month successfully provided assistance in the j-th month, i indicates the mark of the first passenger added in the i-th month, and j indicates the number mark of the j-th month.
[0154] Step 2: Construct the upper left triangular matrix of the first passenger's assistance progress and the upper left triangular matrix of the second passenger's help progress. The number of new first passengers (assistants) collected by the backend management system of the ride code in each month in Step 1, the number of times the new first passengers successfully provided ride assistance each month from the month of addition to the current month {m ij|i=0,...,11;j=1,...,12} construct the upper left triangular matrix of the first passenger assistance progress. The number of new second passengers (ride requesters) collected by the ride code backend management system in Step 1 each month, the number of ride requests sent by the new second passengers each month from the new month to the current month {n ij |i=0,...,11;j=1,...,12} construct the upper left triangular matrix of the second passenger request progress.
[0155] Step 3, the discount rate matrix construction phase. Input the upper left triangular matrix of the first passenger's assistance progress and the upper left triangular matrix of the second passenger's help progress in Step 2, and calculate the discount rate according to the formula: f ij =m ij / n ij (i=0, ..., 11; j=1, ..., 12) Calculate the discount rate of new users in each month from the new month to the current month, thereby obtaining the upper left triangular matrix of discount rates.
[0156] Step 4: Discount rate progress factor and discount rate table construction phase. Input the upper left triangle matrix of discount rate in Step 3 and calculate the discount rate progress factor: Among them, a j~j+1 It represents the progress factor from the jth month to the j+1th month, thereby obtaining the progress factor of each month, and then obtaining the discount rate table based on the progress factor of each month.
[0157] Step 5, discount fee calculation stage. Input the discount rate table in Step 4, multiply the fare for the first passenger who successfully provides ride assistance each month by the corresponding discount rate in the discount table to get the discount fee.
[0158] This scheme collects the number of assistances provided by the assistor (the first passenger) and the number of help requests provided by the help seeker (the second passenger), and constructs the upper left triangular matrix of the first passenger's assistance progress and the upper left triangular matrix of the second passenger's help progress, respectively. It also uses non-parametric estimation methods to estimate the assistance progress matrix and the help progress matrix, respectively, to obtain the estimated values of the progress factor and the discount factor for each month, and to build a reward and punishment system for the mutual aid ride code system.
[0159] This solution uses non-parametric estimation to solve the problem of small samples that cannot be used for parameter estimation due to insufficient data. Parameter estimation requires that the sample data meet the full rank condition in order to solve the model through the sample data. However, for the scenario of this solution, the amount of data is often small at the beginning of the business, which often leads to the inability to solve the model. The use of non-parametric estimation methods can effectively avoid the problem of parameters that cannot be solved due to small samples.
[0160] This solution collects the number of times new mutual assistance (first passengers) users provide assistance each month in the past 12 months to build a 12*12 dimensional upper left triangular matrix of first passenger assistance progress; at the same time, it collects the number of times new mutual assistance (second passengers) users ask for help each month in the past 12 months to build a 12*12 dimensional upper left triangular matrix of second passenger help progress. Based on these two matrices, a discount rate model based on the number of requests for help and the number of requests for assistance is constructed, which can effectively solve the problem of requiring large sample data in parameter estimation.
[0161] In this solution, the first passenger who provides assistance does not need to pay any fare for the person seeking help, and can obtain fare discount points. The discount rate is dynamically adjusted according to the number of assistances and requests for help provided by the first and second passengers. This can scientifically evaluate the discount rate enjoyed by the first passenger, so that those who provide more assistance will get more discounts, and those who provide fewer assistance will get fewer discounts.
[0162] This solution can effectively enhance mutual assistance among passengers, and also solve the inconvenience caused by the help-seekers due to problems such as lack of power in the mobile terminal, mobile terminal crash, inability to scan the boarding code, forgetting to bring the mobile phone, etc.
[0163] The scheme of the present invention can be applied to all public transportation travel discount schemes such as buses and subways.
[0164] It is understandable that in the specific implementation of the present application, related data such as user information, driving data, transaction data, etc. are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0165] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0166] According to another aspect of the embodiment of the present invention, there is also provided an operation code processing device for implementing the above operation code processing method. Fig.11 As shown, the device comprises:
[0167] The first acquisition module 1102 is used to acquire a target operation request triggered by a target operation code of a scanning target account in a current period in a current cycle;
[0168] a second acquisition module 1104, configured to, when the target account is a first type account, acquire a resource transfer discount parameter corresponding to the target account in the current time period, wherein the resource transfer discount parameter is a parameter determined based on the number of code scanning times of the first type account in a target historical time period corresponding to the current time period in a plurality of historical time periods and the number of code scanning requests of the second type account in the target historical time period, the plurality of historical time periods being historical time periods in a previous cycle before the current cycle, the first type account is an account that uses an operation code of the first type account to replace an operation code of the second type account to perform a scanning operation, the number of code scanning times is the number of times the operation code of the first type account is used to replace an operation code of the second type account to perform a scanning operation, the second type account is an account that requests to use the operation code of the first type account to replace an operation code of the second type account to perform a scanning operation, and the number of code scanning requests is the number of times the operation code of the first type account is requested to replace an operation code of the second type account to perform a scanning operation;
[0169] The processing module 1106 is configured to respond to the target operation request and transfer a target amount of resources from the resource set of the target account according to the resource transfer discount parameter.
[0170] As an optional solution, the device is also used for:
[0171] Obtaining the number of scans of the first type of account in the target historical period among the multiple historical periods;
[0172] Obtain the number of code scanning requests by the second type of account during the target historical period;
[0173] The resource transfer discount parameter corresponding to the target account in the current period is determined according to the number of code scanning by the first type account in the target historical period and the number of code scanning requests by the second type account in the target historical period.
[0174] As an optional solution, the device is also used for:
[0175] Before determining the resource transfer discount parameter corresponding to the target account in the current time period according to the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period, when the target account is the first type of account and the time when the target account first uses the operation code of the target account instead of the operation code of the second type of account to perform a scanning operation is in the current cycle, the target historical time period corresponding to the current time period is determined in the previous cycle, wherein the previous cycle and the current cycle both include N historical time periods, and the arrangement position of the target historical time period in the previous cycle is the same as the arrangement position of the current time period in the current cycle, and N is an integer greater than or equal to 1.
[0176] As an optional solution, the device is also used for:
[0177] Before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scans of the first type of account in the target historical period and the number of code scan requests of the second type of account in the target historical period, when the time when the target account first uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation is in the Pth period in the current cycle, and the current period is the Sth period in the current cycle, the number of code scans of the first type of account in the target historical period and the number of code scan requests of the second type of account in the target historical period are obtained, wherein the target historical period is the Sth period in the previous cycle, the time when the first type of account first uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth period in the previous cycle, and the time when the second type of account first requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth period in the previous cycle, and 1≤P≤S≤N.
[0178] As an optional solution, the device is used to determine the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scanning times of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period in the following manner:
[0179] The resource transfer discount parameter corresponding to the target account in the current period is obtained by dividing the number of code scans of the first type account in the target historical period by the number of code scan requests of the second type account in the target historical period.
[0180] As an optional solution, the device is also used for:
[0181] Before determining the resource transfer discount parameter corresponding to the target account in the current period based on the number of scans of the first type of account in the target historical period and the number of scan requests of the second type of account in the target historical period, when the target account is the first type of account and the time when the target account first uses the operation code of the target account instead of the operation code of the second type of account to perform a scanning operation is in the previous cycle, the last historical period in the previous cycle is determined as the target historical period, wherein the previous cycle and the current cycle both include N historical periods, and N is an integer greater than or equal to 1.
[0182] As an optional solution, the device is also used for:
[0183] Before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scanning of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period, when the time when the target account first uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation is in the Pth period in the previous cycle and the current period is the Sth period in the current cycle, the number of code scanning of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period are obtained, wherein the target historical period is the Nth period in the previous cycle, the time when the first type of account first uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth period in the previous cycle, and the time when the second type of account first requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth period in the previous cycle, and 1≤P≤N, 1≤S≤N.
[0184] As an optional solution, the device is used to determine the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scanning times of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period in the following manner:
[0185] Divide the number of code scanning times of the first type of account in the target historical period by the number of code scanning requests of the second type of account in the target historical period to obtain a resource transfer discount parameter corresponding to the Nth period in the previous cycle;
[0186] The resource transfer discount parameter corresponding to the Nth time period in the previous cycle and the discount progress factor from the Nth time period in the previous cycle to the current time period are determined.
[0187] As an optional solution, the device is used to determine the resource transfer discount parameter corresponding to the target account in the current period according to the resource transfer discount parameter corresponding to the Nth period in the previous cycle and the discount progress factor from the Nth period in the previous cycle to the current period in the following manner:
[0188] The resource transfer discount parameter corresponding to the target account in the current period is determined by the following formula:
[0189] f P,j+1 =f P,j ·a j~j+1
[0190] Among them, N-P+1≤j≤N-P+S, f P,j=N-P+1 represents the resource transfer discount parameter corresponding to the Nth period in the previous cycle, f P,j+1=N-P+S+1 represents the resource transfer discount parameter corresponding to the target account in the current period, a j~j+1 represents the discount progress factor from the jth period to the j+1th period starting from the Pth period in the previous cycle.
[0191] As an optional solution, the device is also used for:
[0192] The discount progress factor from the Nth period in the previous cycle to the current period is determined by the following formula:
[0193] When j=1,…,N-1
[0194] Among them, f i,j It represents the resource transfer discount parameter corresponding to the account in the i+jth time period that performs a scanning operation for the first time using the operation code of the first type of account instead of the operation code of the second type of account in the i-th time period in the previous cycle.
[0195] As an optional solution, the device is used to transfer a target amount of resources from the resource set of the target account according to the resource transfer discount parameter in the following manner:
[0196] Obtaining a base quantity corresponding to the target account;
[0197] The product of the reference quantity and the resource transfer discount parameter is determined as the target quantity, wherein 0<the resource transfer discount parameter<1;
[0198] The target amount of resources is transferred from the resource set of the target account.
[0199] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1209, and / or installed from a removable medium 1211. When the computer program is executed by the central processor 1201, various functions provided in the embodiments of the present application are executed.
[0200] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0201] Fig.12 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0202] It should be noted that Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0203] like Fig.12 As shown, the computer system 1200 includes a central processing unit 1201 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1202 (ROM) or the program loaded from the storage part 1208 to the random access memory 1203 (RAM). Various programs and data required for system operation are also stored in the random access memory 1203. The central processing unit 1201, the read-only memory 1202 and the random access memory 1203 are connected to each other through a bus 1204. The input / output interface 1205 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1204.
[0204] The following components are connected to the input / output interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1120 is also connected to the input / output interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1120 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.
[0205] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processor 1201, various functions defined in the system of the present application are executed.
[0206] According to another aspect of the embodiment of the present invention, an electronic device for implementing the above-mentioned operation code processing method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig.13 As shown, the electronic device includes a memory 1302 and a processor 1304. The memory 1302 stores a computer program, and the processor 1304 is configured to execute the steps in any of the above method embodiments through the computer program.
[0207] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0208] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0209] S1, obtaining a target operation request triggered by a target operation code of a scanning target account in a current period in a current cycle;
[0210] S2, when the target account is a first type account, obtain a resource transfer discount parameter corresponding to the target account in the current time period, wherein the resource transfer discount parameter is a parameter determined based on the number of scan code scans of the first type account in the target historical time period corresponding to the current time period in multiple historical time periods and the number of scan code requests of the second type account in the target historical time period, the multiple historical time periods are historical time periods in a previous cycle before the current cycle, the first type account is an account that uses the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, the number of scan code scans is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation, the second type account is an account that requests to use the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, and the number of scan code requests is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation;
[0211] S3, in response to the target operation request, transferring a target amount of resources from the resource set of the target account according to the resource transfer discount parameter.
[0212] Alternatively, a person skilled in the art may understand that: Fig.13 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.13 The electronic device and the electronic equipment described above are not limited in structure. Fig.13 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.13 Different configurations are shown.
[0213] Among them, the memory 1302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the operation code processing method and device in the embodiment of the present invention. The processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, that is, realizing the above-mentioned operation code processing method. The memory 1302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1302 may further include a memory remotely arranged relative to the processor 1304, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. Among them, the memory 1302 can be specifically but not limited to being used to store virtual resource discount parameters, operation codes and other information. As an example, if Fig.13 As shown, the memory 1302 may include but is not limited to the first acquisition module 1102, the second acquisition module 1104 and the processing module 1106 in the processing device of the operation code. In addition, other module units in the processing device of the operation code may also be included but are not limited to, which will not be repeated in this example.
[0214] Optionally, the transmission device 1306 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1306 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0215] In addition, the electronic device further includes: a display 1308 for displaying the target operation code; and a connection bus 1310 for connecting various module components in the electronic device.
[0216] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.
[0217] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the operation code processing method provided in various optional implementations of the above-mentioned operation code processing.
[0218] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0219] S1, obtaining a target operation request triggered by a target operation code of a scanning target account in a current period in a current cycle;
[0220] S2, when the target account is a first type account, obtain a resource transfer discount parameter corresponding to the target account in the current time period, wherein the resource transfer discount parameter is a parameter determined based on the number of scan code scans of the first type account in the target historical time period corresponding to the current time period in multiple historical time periods and the number of scan code requests of the second type account in the target historical time period, the multiple historical time periods are historical time periods in a previous cycle before the current cycle, the first type account is an account that uses the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, the number of scan code scans is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation, the second type account is an account that requests to use the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, and the number of scan code requests is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation;
[0221] S3, in response to the target operation request, transferring a target amount of resources from the resource set of the target account according to the resource transfer discount parameter.
[0222] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0223] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0224] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
[0225] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0226] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0227] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0228] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0229] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing an operation code, characterized in that: include: Get the target operation request triggered by the target operation code of the target account in the current period of the current cycle; When the target account is a first type account, a resource transfer discount parameter corresponding to the target account in the current time period is obtained, wherein the resource transfer discount parameter is a parameter determined according to the number of code scanning times of the first type account in a target historical period corresponding to the current period in multiple historical periods and the number of code scanning requests of the second type account in the target historical period, the multiple historical periods are historical periods in a previous cycle before the current cycle, the first type account is an account that uses the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, the number of code scanning times is the number of times the operation code of the first type account is used to replace the operation code of the second type account to perform a scanning operation, the second type account is an account that requests to use the operation code of the first type account to replace the operation code of the second type account to perform a scanning operation, and the number of code scanning requests is the number of times the operation code of the first type account is requested to replace the operation code of the second type account to perform a scanning operation; In response to the target operation request, a target amount of resources is transferred from the resource set of the target account according to the resource transfer discount parameter.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining the number of scans of the first type of account in the target historical period among the multiple historical periods; Obtain the number of code scanning requests by the second type of account during the target historical period; The resource transfer discount parameter corresponding to the target account in the current period is determined according to the number of code scannings by the first type of account in the target historical period and the number of code scanning requests by the second type of account in the target historical period.
3. The method according to claim 2, characterized in that Before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scans by the first type of account in the target historical period and the number of code scan requests by the second type of account in the target historical period, the method further includes: When the target account is the first type of account and the time when the target account uses the operation code of the target account instead of the operation code of the second type of account to perform a scanning operation for the first time is in the current cycle, the target historical time period corresponding to the current time period is determined in the previous cycle, wherein the previous cycle and the current cycle both include N historical time periods, and the arrangement position of the target historical time period in the previous cycle is the same as the arrangement position of the current time period in the current cycle, and N is an integer greater than or equal to 1.
4. The method according to claim 3, characterized in that Before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scans by the first type of account in the target historical period and the number of code scan requests by the second type of account in the target historical period, the method further includes: When the time when the target account uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation for the first time is in the Pth time period in the current cycle, and the current time period is the Sth time period in the current cycle, the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period are obtained, wherein the target historical time period is the Sth time period in the previous cycle, the time when the first type of account uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation for the first time in the previous cycle is in the Pth time period in the previous cycle, and the time when the second type of account requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation for the first time in the previous cycle is in the Pth time period in the previous cycle, and 1≤P≤S≤N.
5. The method according to claim 3, characterized in that: The determining, according to the number of code scanning of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period, the resource transfer discount parameter corresponding to the target account in the current period includes: The resource transfer discount parameter corresponding to the target account in the current period is obtained by dividing the number of code scans of the first type account in the target historical period by the number of code scan requests of the second type account in the target historical period.
6. The method according to claim 2, characterized in that Before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scans by the first type of account in the target historical period and the number of code scan requests by the second type of account in the target historical period, the method further includes: When the target account is the first type of account and the time when the target account first uses the operation code of the target account instead of the operation code of the second type of account to perform a scanning operation is in the previous cycle, the last historical period in the previous cycle is determined as the target historical period, wherein the previous cycle and the current cycle both include N historical periods, and N is an integer greater than or equal to 1.
7. The method according to claim 6, characterized in that Before determining the resource transfer discount parameter corresponding to the target account in the current period according to the number of code scans by the first type of account in the target historical period and the number of code scan requests by the second type of account in the target historical period, the method further includes: When the time when the target account first uses the operation code of the target account to replace the operation code of the second type of account to perform a scanning operation is in the Pth time period in the previous cycle, and the current time period is the Sth time period in the current cycle, the number of scans of the first type of account in the target historical time period and the number of scan requests of the second type of account in the target historical time period are obtained, wherein the target historical time period is the Nth time period in the previous cycle, the time when the first type of account first uses the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, and the time when the second type of account first requests to use the operation code of the first type of account to replace the operation code of the second type of account to perform a scanning operation in the previous cycle is in the Pth time period in the previous cycle, 1≤P≤N, 1≤S≤N.
8. The method according to claim 7, characterized in that The determining, according to the number of code scanning of the first type of account in the target historical period and the number of code scanning requests of the second type of account in the target historical period, the resource transfer discount parameter corresponding to the target account in the current period includes: Divide the number of code scanning times of the first type of account in the target historical period by the number of code scanning requests of the second type of account in the target historical period to obtain a resource transfer discount parameter corresponding to the Nth period in the previous cycle; The resource transfer discount parameter corresponding to the Nth time period in the previous cycle and the discount progress factor from the Nth time period in the previous cycle to the current time period are determined.
9. The method according to claim 8, characterized in that The determining, according to the resource transfer discount parameter corresponding to the Nth time period in the previous cycle and the discount progress factor from the Nth time period in the previous cycle to the current time period, the resource transfer discount parameter corresponding to the target account in the current time period includes: The resource transfer discount parameter corresponding to the target account in the current period is determined by the following formula: f P,j+1 =f P,j ·a j~j+1 Among them, N-P+1≤j≤N-P+S, fP,j=N-P+1 represents the resource transfer discount parameter corresponding to the Nth period in the previous cycle, fP,j+1=N-P+S+1 represents the resource transfer discount parameter corresponding to the target account in the current period, aj~j+1 represents the discount progress factor from the jth period to the j+1th period starting from the Pth period in the previous cycle.
10. The method according to claim 9, characterized in that The method further comprises: The discount progress factor from the Nth period in the previous cycle to the current period is determined by the following formula: When j=1,…,N-1 Among them, f i,j It represents the resource transfer discount parameter corresponding to the account in the i+jth time period that performs a scanning operation for the first time using the operation code of the first type of account instead of the operation code of the second type of account in the i-th time period in the previous cycle.
11. The method according to any one of claims 1 to 10, characterized in that The transferring a target amount of resources from the resource set of the target account according to the resource transfer discount parameter includes: Obtaining a base quantity corresponding to the target account; The product of the reference quantity and the resource transfer discount parameter is determined as the target quantity, wherein 0<the resource transfer discount parameter<1; The target amount of resources is transferred from the resource set of the target account.
12. An operation code processing device, characterized in that: include: A first acquisition module is used to acquire a target operation request triggered by a target operation code of a scanning target account in a current period in a current cycle; a second acquisition module, configured to, when the target account is a first type account, acquire a resource transfer discount parameter corresponding to the target account in the current time period, wherein the resource transfer discount parameter is a parameter determined based on the number of code scanning times of the first type account in a target historical time period corresponding to the current time period in a plurality of historical time periods and the number of code scanning requests of the second type account in the target historical time period, the plurality of historical time periods being historical time periods in a previous cycle before the current cycle, the first type account is an account that uses an operation code of the first type account to replace an operation code of the second type account to perform a scanning operation, the number of code scanning times is the number of times the operation code of the first type account is used to replace an operation code of the second type account to perform a scanning operation, the second type account is an account that requests to use the operation code of the first type account to replace an operation code of the second type account to perform a scanning operation, and the number of code scanning requests is the number of times the operation code of the first type account is requested to replace an operation code of the second type account to perform a scanning operation; The processing module is used to respond to the target operation request and transfer a target amount of resources from the resource set of the target account according to the resource transfer discount parameter.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 11.
14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.
15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 11 through the computer program.
Citation Information
Patent Citations
Tourism system managing method, electronic equipment and storage medium
CN108876449A
Data query method and system, heterogeneous acceleration platform and storage medium
CN113641701A