Rule processing method, electronic device and computer program product

By configuring delay periods for the second rule, the problem of rapid adjustment of sales activities has been solved, resulting in users not being able to enjoy the expected discounts, and the combination of user experience protection and operational flexibility is achieved.

CN119722178APending Publication Date: 2025-03-28北京理房通支付科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411793814.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

During product promotion, rapid adjustments in sales activities may cause users to be unable to enjoy the expected discounts or rights, reducing users' trust in the platform.

Method used

By configuring a delay period for the second rule to make it effective during the delay period, it ensures that users can enjoy the expected discounts or benefits within a certain period of time, and at the same time, operators are allowed to update and use the first rule in a timely manner.

Benefits of technology

It realizes the rapid adjustment of sales activities, while protecting users' expected experience and trust, and ensuring that users can achieve the "what you see is what you get" shopping experience within a certain period of time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722178A_ABST
    Figure CN119722178A_ABST
Patent Text Reader

Abstract

The invention provides a rule processing method, electronic equipment and a computer program product. The rule processing method comprises the steps that whether a first rule is in a compatible mode or not is determined, and the first rule is the latest sales rule of a product; when the first rule is in the compatible mode, a delay period is configured for a second rule, the second rule is an original sales rule of the product, the generation time of the second rule is earlier than the generation time of the first rule, and the second rule can be used for selling the product in the delay period; and at the end of the delay period, determining the second rule as invalid, the invalid second rule being unavailable to sell the product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to technical fields such as data processing, and more particularly to a rule processing method, an electronic device, and a computer program product. Background Art

[0002] In the process of product promotion, users will be attracted through sales activities, and user stickiness will be increased through the iteration of activities. Especially in actual sales scenarios, product operators will adjust the online sales activities in real time so that sales activities can take into account both market demand and operational capabilities.

[0003] However, if a sales activity has been seen by users, and the operator adjusts or cancels the sales activity between the time when the user sees the activity and the time when the user participates in the activity, the user will not be able to enjoy the expected discounts or benefits when placing an order, which will reduce the user's trust in the platform. Obviously, it is difficult to balance the timeliness of sales strategy adjustments with user trust and the user's experience of participating in activities. Summary of the invention

[0004] The present disclosure provides a rule processing method, an electronic device, and a computer program product.

[0005] According to one aspect of the present disclosure, a rule processing method is provided, including: determining whether a first rule is in a compatible mode, the first rule being the latest sales rule for a product; when the first rule is in a compatible mode, configuring a delay period for a second rule, the second rule being the original sales rule for the product, the generation time of the second rule being earlier than the generation time of the first rule, and the second rule being able to be used to sell the product during the delay period; and when the delay period ends, determining the second rule as invalid, and the invalid second rule cannot be used to sell the product.

[0006] In some embodiments, when the first rule is in compatible mode, it also includes: configuring the lock token of the second rule to take effect, when the lock token takes effect, the second rule can be used to sell the product, and the lock token is used to represent the effectiveness of the corresponding sales rule.

[0007] In some implementations, when the delay period ends, determining the second rule as invalid includes: when the delay period ends, setting a lock token of the second rule to invalid, and the second rule is invalid when the lock token is invalid.

[0008] In some implementations, when the first rule is in a compatible mode, the method further includes: writing the delayed tasks of the second rule into a delayed queue, wherein the delayed queue is used to manage the delayed tasks of the sales rule.

[0009] In some embodiments, when the delay period ends, the second rule is determined to be invalid, including: when the delay queue monitors that the delay period of the second rule ends, writing the rule identifier of the second rule into a target queue, the target queue being used to record the rule identifier of the sales rule at the end of the delay period; and when the target queue records the rule identifier of the second rule, determining the locking token of the second rule as invalid in a rule database, so that the second rule is invalid. The rule database is used to record sales rules.

[0010] In some embodiments, after determining the second rule to be invalid, the method includes: assigning a first version number to a rule set including the first rule and the invalid second rule in the rule database, and writing the first version number to a first storage unit, wherein the first storage unit is used to record the latest version number of the rule set in the rule database, wherein the rule set includes multiple sales rules for the product and the effectiveness of each sales rule.

[0011] In some implementations, the further method further includes: copying the rule set in the rule database to a second storage unit, and the valid sales rules in the second storage unit can be used to sell the product.

[0012] In some implementations, the further method includes: when the version number of the rule set in the second storage unit is inconsistent with the version number recorded in the first storage unit, updating the rule set in the second storage unit according to the rule database.

[0013] In some implementations, it also includes: determining whether the delay period for the second rule in the rule database for locking the token to be effective has ended based on the current time; and adjusting the locking token of the second rule for which the delay period has ended to be invalid, so that the second rule is invalid.

[0014] In some implementations, when the first rule is in a compatible mode, the first rule is displayed on the user interface, and the second rule is canceled; both the first rule and the second rule are valid during the delay period.

[0015] In some implementations, when the first rule is in compatible mode, it also includes: determining a target user for the second rule, the target user being a user who has viewed the second rule through the user interface when the second rule is displayed on the user interface, and the second rule is valid for the target user during the delay period.

[0016] In some implementations, when the second rule is displayed on the target interface, it includes: configuring a read mark for a user who views the second rule through the target interface, and the user with the read mark is the target user of the second rule.

[0017] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the rule processing method of any embodiment of the present disclosure.

[0018] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the rule processing method of any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0020] Figure 1 It is a schematic diagram of an application scenario of the rule processing method according to an embodiment of the present disclosure.

[0021] Figure 2 It is an interactive schematic flow chart of the rule processing method according to an embodiment of the present disclosure.

[0022] Figure 3 It is an architectural diagram of a rule processing method according to an embodiment of the present disclosure.

[0023] Figure 4 It is a schematic diagram of the second rule effectiveness change process according to an embodiment of the present disclosure.

[0024] Figure 5 It is a flow chart of a rule processing method according to an embodiment of the present disclosure.

[0025] Figure 6 It is a schematic block diagram of the structure of a rule processing method device according to an embodiment of the present invention.

[0026] Figure 7 It is a schematic block diagram of the structure of an electronic device equipped with a rule processing method device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0028] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] In order to increase user stickiness and freshness, product operators will constantly update the sales strategy for the product in the sales system. For example, the original sales activity for a certain product was "buy one get one free"; however, during the sales process, it was found that most users had less demand for double products, so the sales rule was changed to "60% off for a single product." The original intention of adjusting the sales rules was to cater to the purchasing needs of most users, but inevitably, another part of the users saw the "buy one get one free" activity and prepared to place an order. At this time, the user will see that the activity changes to "60% off for a single product" when placing an order, making it impossible for such users to achieve a "what you see is what you get" shopping experience, nor to enjoy the expected discounts or rights, which undoubtedly consumes the trust of such users in the sales system.

[0030] To this end, the present disclosure proposes a rule processing method.

[0031] Figure 1 Schematic diagram of an application scenario of the rule processing method according to an embodiment of the present disclosure. Figure 1 As shown, in this scenario, a server 100 and a terminal 200 may be included. The server 100 may be a cloud server or a physical server, which includes a corresponding processor and a memory; the terminal 200 is not limited to a mobile phone, a tablet, a computer, etc. The server 100 and the terminal 200 may communicate via a network, Bluetooth, or the like.

[0032] After receiving the first rule and the working mode of the first rule, the server 100 first determines whether the working mode of the effectiveness condition of the first rule is a compatible mode. The compatible mode means that the first rule is also compatible with the remaining rules when it takes effect, and the incompatible mode means that the first rule does not allow the selection of the remaining rules when it takes effect. Then, if the first rule is in compatible mode, a delay period is configured for the second rule so that the second rule is valid during the delay period. Finally, after the delay period ends, it is determined that the second rule is invalid. When the terminal 200 sees the second rule and places an order, as long as the ordering moment is in the delay period, the user can still use the second rule to obtain the product and enjoy the original discount or rights. At the same time, it does not delay the operator from updating and using the first rule in a timely manner according to market demand or operational capabilities.

[0033] The present disclosure sets a delay period for the second rule and sets the lock token to take effect, so that the first rule can be written into the database in a timely manner, and the second rule has some buffer time before it becomes invalid, thereby ensuring that users who see the rule can achieve a "what you see is what you get" effect within a certain period of time.

[0034] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the rule processing method implemented in the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows: The first rule: It is the latest sales rule for the product, indicating the latest sales strategy of the product seller.

[0035] The second rule is the original sales rule of the product. When generating new rules iteratively, any sales rule can be used as the second rule.

[0036] Working mode of the first rule: indicates the compatibility of the first rule with other rules, including compatible mode and incompatible mode. If the first rule is in incompatible mode, the second rule will be invalid when the first rule takes effect; on the contrary, if the first rule is in compatible mode, the second rule can be valid during the delay period, so that users can freely choose the first rule or the second rule during the delay period and enjoy corresponding benefits or rights.

[0037] Lock token: It includes two states: effective and ineffective. It is a tool to control the effectiveness and ineffectiveness of sales rules. In the effective state, the bound rules are effective, allowing users to view and select when placing orders; in the ineffective state, the bound rules are invalid, and users cannot view and lock the corresponding rules. Usually, when the first rule is in compatible mode, the system will configure the lock token of the second rule to be effective.

[0038] Delay period: It is the time from when the first rule is written into the database to when the first rule takes effect. During the delay period, both the first rule and the second rule are effective. The delay period can be determined based on market demand and the sales capacity of the product seller, and can be any length of time such as 1 minute, 10 minutes, 1 day, etc., and there is no limit here.

[0039] Rule database: records rule sets containing various sales rules and rule states. Each rule set has a different rule set version number according to the rules and rule states it contains. When pushing sales rules to the client, the rule database can be called to search for valid sales rules, but it takes a certain amount of time to wait, which is inefficient.

[0040] The first storage unit is used to record the latest version number of the rule set in the rule database. Retrieving the version number from the first storage unit has a higher retrieval efficiency than retrieving the version number from the rule database.

[0041] The second storage unit is used to record a copy of the latest rule set in the rule database, including a first rule copy and a second rule copy. It also records the version number of the rule set and the effectiveness status of each sales rule. The efficiency of searching for valid sales rules from the second storage unit and pushing them to the client is higher than the efficiency of retrieving the rule database to obtain valid sales rules. The second storage unit synchronizes the latest rule set from the rule database at a preset frequency, for example, once every 2 seconds. By comparing the version numbers of the second storage unit and the first storage unit, it is ensured that the rule set in the second storage unit is in the latest state, avoiding the problem of untimely update of the rule set caused by some system failures.

[0042] Delay queue: used to manage delay tasks of sales rules with delay monitoring requirements. For example, if a delay period is configured for the second rule, the delay task containing the delay period will be pushed to the delay queue. When the delay queue detects the end of the delay period, the rule identifier of the second rule will be pushed to the target queue to prompt the rule database that the delay period of the second rule has ended and should be invalidated.

[0043] Target queue: a rule identifier used to record the sales rule at the end of the delayed period, and to provide a basis for the rule database to determine whether the locking token of each sales rule is invalid.

[0044] Figure 2 is an interactive schematic flow chart of a rule processing method according to an embodiment of the present disclosure. Figure 2 , showing Figure 1 When the processor of the server 100 processes the first rule and the second rule, the data flows between the server, the operation end and the client, and the key processing steps of the processor.

[0045] In step S201, the operation end generates a first rule.

[0046] The first rule is the latest sales rule generated by the operator based on the user's demand for a certain product or the operator's own capabilities, which represents the operator's latest sales strategy. For example, a sales rule of "60% off for a single product" is set for a certain product.

[0047] In step S202, the operation end determines the working mode of the first rule.

[0048] The working mode indicates the compatibility of the first rule with the other rules, including compatible mode and incompatible mode. The first rule is determined by the operator's operator on the operation side, and the approval personnel decide whether the first rule can be used and the time conditions for its use. If the approval personnel believe that the first rule can be used, then set the working mode for it. If the approval personnel believe that the first rule is unreasonable, then reject the first rule and do not allow the first rule to be transmitted to the server. For example, the operator determines that the first rule is "50% off for a single product", and the approval personnel believe that "50% off for a single product" does not generate higher revenue and reduces sales compared to the original rule "buy one get one free", then the approval personnel will propose a rejection result. On the contrary, if the operator believes that the first rule of "50% off for a single product" will get better user feedback, then the first rule can be set to be used. When the approval personnel determine that the first rule can be used, the first rule and its working mode will be written to the server.

[0049] In step S203, the server determines whether the working mode of the first rule is a compatible mode. If the first rule is a compatible mode, the server executes step S204 to set a delay period for the second rule.

[0050] The second rule is the original sales rule of the product. Usually, before the first rule is generated, the second rule is in the advertising state. Users can view the second rule through the user interface, and some users want to enjoy the product and corresponding rights and interests through the second rule. When the second rule is displayed in the user interface, users who have viewed the second rule through the user interface are marked with a read mark, and these users are the target users of the second rule. When iterating the second rule to the first rule, it is necessary to consider this type of target users who are expected to obtain the rights and interests corresponding to the second rule. For this purpose, it is proposed to set a delay period for the second rule to extend the validity period of the second rule. During the delay period, the second rule effectively guarantees the target users. If the target users who have seen the second rule place an order within a period of time, they can achieve a "what you see is what you get" purchasing experience.

[0051] Delayed effectiveness means that the first rule is effective, but the second rule does not need to be invalid immediately after the new rule is generated, which provides a buffer time for the second rule. Assuming that the second rule is "buy one get one free", if the remaining quantity of the product is sufficient, it can meet the purchasing needs of most users for a period of time; however, when the market demand for obtaining two products at the same time is not very strong, in order to improve the user's shopping experience, the first rule of "single product 60% off" is generated by iterating the rules, then the "single product 60% off" can be set to delay the effectiveness, and provide a buffer time for the target users who are ready to enjoy the "buy one get one free" activity. However, if the second rule is "buy product and get free gift A", and due to the excessive market demand, the stock of gift A is small (even 0); in order to protect the rights and interests of users, "buy product and get free gift B" is proposed. At this time, when configuring the working mode of the first rule, it can be set to compatible mode. For target users who have seen the second rule, they can get gift A when purchasing products during the delay period; however, any user who purchases the product after the delay period will get gift B. On the basis of protecting the rights and interests of users, a solution is provided for the situation where the stock of gift A is insufficient.

[0052] The delay period is the period between the time when the first rule is generated and the time when the second rule is invalid. It is the buffer time of the second rule. During the delay period, the second rule remains valid and the user can purchase the product according to the second rule. The delay period can be set to 10 minutes, 1 hour or 1 day, etc., according to the needs, and the present disclosure does not limit this.

[0053] If the first rule is in an incompatible mode, then the server executes step S209 to control the lock token of the second rule to be invalid, so that the second rule is invalid.

[0054] The lock token includes two states: effective and invalid. The lock token in the effective state is an identifier indicating that the corresponding sales rule can be selected by the user; in the invalid state, the corresponding sales rule does not have the identifier selected by the user and cannot be used to sell products. However, even if the lock token is in the effective state, as long as the first rule is generated, the user interface will display the first rule and cancel the display of the second rule.

[0055] When the first rule is in an incompatible mode, the second rule should be invalidated and its lock token should be set to invalid.

[0056] Regardless of whether the working mode of the first rule is compatible mode or incompatible mode, after the first rule is generated, the lock token of the first rule should be set to take effect and displayed on the user interface so that the first rule can be viewed through the client and can be selected when the user places an order.

[0057] After the first rule is in the compatible mode and a delay period is set for the second rule, the server executes step S205 to determine whether the delay period has not ended.

[0058] If the delay period ends, step S209 is executed to set the lock token of the second rule to be invalid, so that the second rule cannot be selected, and the second rule is invalid.

[0059] On the contrary, if the delay period has not ended, the server executes step S206 to maintain the lock token of the second rule in effect. When the lock token is effective, the second rule can be selected by the target user, and the target user can obtain the product and corresponding rights and interests according to the second rule. At the same time, the server continues to execute step S205 to monitor the delay period, so as to ensure that the server can promptly detect the end of the delay period and promptly iterate the effective sales rules.

[0060] When the second rule lock token is effective, the server synchronizes this information to the client. The client executes step S207 to display the first rule on the user interface. Non-target users who have not viewed the second rule can only select the first rule, but target users are allowed to select the second rule when placing an order. Furthermore, the client can execute step S208 to select the second rule when the target user places an order and purchase the product according to the second rule.

[0061] If the lock token of the second rule expires, the server will also synchronize the message to the client. The client executes step S210, displays the first rule in the user interface, does not allow the second rule to be selected, and the target user and the non-target user can only select the latest sales rule when placing an order, completing the rule iteration process.

[0062] Through the aforementioned process, the operator is guaranteed to timely iterate the sales rules based on its own operational capabilities and market demand. The delay mechanism also satisfies the needs of some users for the original rules, taking into account both rule updates and the user's "what you see is what you get" purchasing experience.

[0063] Figure 3 is an architectural diagram of a rule processing method according to an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the second rule effectiveness change process according to the embodiment of the present disclosure. Figure 3 and Figure 4 right Figure 1 The overall architecture of the rule processing method implemented by the server is described in the following.

[0064] After the first rule is updated on the operation side, the first rule is written into the rule database. The first storage unit automatically iterates the version of the rule set in the rule database. For example, if the rule set in the rule database originally only contains the second rule, then the version number of the rule set containing only the second rule in the first storage unit can be set to V0. After the first rule is written into the rule database, the rule set includes the first rule and the second rule that is effective when the lock token is locked. At this time, the first storage unit updates the stored version number to V1.

[0065] The first storage unit is used to update the version number of the rule set in real time according to the version of the rule set in the rule database. In order to improve the speed at which users obtain sales rules, the rule set in the rule database will be copied to the second storage unit in advance, so that users do not need to frequently call the rule database when obtaining sales rules. The version number of the rule set in the database stored in the first storage unit is mainly used to verify whether the rule set stored in the second storage unit is consistent with the rule set in the rule database, avoiding the problem of synchronization delay of the rule set in the second storage unit, and taking into account the efficiency and accuracy of rule push. For example, after writing the first rule in the rule database, the second storage unit records the first rule and its effectiveness as valid, and the second rule and its effectiveness as valid. The version number of the rule set recorded in the second storage unit is V1, which is consistent with the version number V1 of the first storage unit. At this time, if the user wants to buy the product and the user has a read mark about the second rule, then the user is the target user of the second rule, and the first rule and the second rule in a valid state will be pushed from the second storage unit to the target user, and the target user is allowed to select the first rule or the second rule.

[0066] Further, when the first rule is in compatible mode, a delay period is configured for the second rule, and the lock token of the second rule is set to take effect. Then, a delay task for the second rule is generated according to the extended period. And the delay task of the second rule is added to the delay queue. The delay queue manages and executes the delay task, and promptly determines whether the delay period of the second rule ends. For example, a delay task of the second rule is added to the delay queue, and the delay task includes monitoring whether the delay time of the second rule reaches 10 minutes.

[0067] Furthermore, the delay queue monitors and determines in real time whether the extended period has ended. Usually, the timing starts from the moment the second rule is added to the delay queue. Ideally, the moment the second rule is added to the delay queue coincides with the moment the first rule is written into the rule database. Furthermore, during the timing process, it is periodically determined whether the timing duration has reached the duration of the delay period, until it is monitored that the timing duration has reached the duration of the delay period, and the delay period is determined to have ended. For example, after 10 minutes of timing, the timing duration exceeds the duration of the delay period.

[0068] If the delay period ends, the rule identifier of the second rule is written into the target queue. The target queue is used to record the rule identifier of the sales rule at the end of the delay period. For example, the rule identifier of the second rule is recorded in the target queue: ID2.

[0069] Then, the target queue feeds back the recorded content to the rule database. The rule database searches for the corresponding sales rule according to the rule identifier in the target queue. For example, the corresponding sales rule found according to ID2 is the second rule. Then, the lock token of the second rule in the rule database is set to invalid, so that the effectiveness of the second rule is invalid.

[0070] After the rule lock token and the validity of the rule in the rule database are adjusted, the version of the rule set in the rule database is also updated. At this time, the rule set is updated from "valid first rule and valid second rule" to "valid first rule and invalid second rule". Therefore, the first storage unit will iterate the version number to V2 according to the new version of the rule set.

[0071] At the same time, the second storage unit should read and copy the rule set in the rule database and record the copy of the rule set. After the update, the second storage unit should include: the valid first rule and the invalid second rule, and the version number V2 corresponding to the rule set. The frequency of the second storage unit reading the rule database can be once every 2 seconds, or other frequencies, which are not limited here.

[0072] Furthermore, the first storage unit and the second storage unit will compare the version numbers at a preset frequency to determine whether the two are consistent. If they are inconsistent, it proves that the copy of the rule set in the second storage unit has not been updated to the latest version, and then the second storage unit is controlled to update the copy of the rule set according to the latest rule set of the rule database, or a deviation alarm is generated to remind system maintenance personnel to maintain the second storage unit in a timely manner.

[0073] In order to ensure that the second rule can be invalidated in time after the delay period, the lock token of the second rule in the rule database is promptly invalidated so that the second rule becomes invalid in time. The processor in the server will also monitor the delay queue at a preset frequency, that is, to determine whether the difference between the current time and the moment when the first rule is written into the rule database is greater than the delay period. If so, the rule token of the second rule in the rule database is actively set to invalid; if not, monitor at any time until the delay queue detects the end of the delay period. Through the above-mentioned method, the sales system is prevented from failing to execute delayed tasks in the delay queue due to an unexpected restart, and the system is also prevented from being attacked by malicious attacks by tampering with messages. The lock token should be invalid but is not synchronized to the target queue, resulting in the failure to invalidate the sales rule in time, thereby avoiding losses caused by the failure to invalidate the sales rule in time.

[0074] For example, the generation time of the first rule is the same as the time of writing into the rule database, which is 11:10 on September 29, 2024, and the delay period of the second rule is from 11:10 on September 29, 2024 to 12:09 on September 29, 2024. In this extended period, the second rule is valid, and the target user who has seen the rule can use the second rule to purchase products. When the system detects that the current time is 12:10 on September 29, 2024, the difference between it and the generation time of the first rule, 11:10 on September 29, 2024, is 1 hour and 1 minute, which is greater than the delay period of 1 hour; the lock token of the second rule may still be valid due to an unexpected restart or other reasons. In this case, the system can actively control the lock token of the second rule to be invalid, so as to control the invalidation of the second rule, overcome the dependence on the delay queue or the target queue, and avoid the rules that should be invalid but are not invalidated in time from being pushed to the user, resulting in losses and reduced credit.

[0075] Figure 5 : is a flow chart of a rule processing method according to an embodiment of the present disclosure. In order to implement the above solution, the present disclosure proposes a rule processing method M500, including: Step S510, determining whether the first rule is in compatible mode, the first rule is the latest sales rule for the product; Step S520, when the first rule is delayed in taking effect, configuring a delay period for the second rule, the second rule is the original sales rule for the product, the generation time of the second rule is earlier than the generation time of the first rule, and the second rule can be used to sell the product during the delay period; and Step S530, when the delay period ends, determining the second rule as invalid, the invalid second rule cannot be used to sell the product.

[0076] The rule processing method proposed in the present disclosure sets a delay period for the second rule and sets the lock token to take effect, so that the first rule can be written into the database in time, and the second rule has some buffer time before it becomes invalid, which ensures that the target users who see the rule can achieve the "what you see is what you get" effect within a certain period of time. In addition, by actively monitoring whether the difference between the current time and the time when the first rule is written into the database is greater than the length of the delay period of the second rule when the lock token takes effect, the sales rules that cannot be invalidated in time due to the end of the delay period in abnormal conditions such as accidental restart or malicious attack of the sales system are avoided, and the losses caused by these rules that fail to be invalidated in time are avoided.

[0077] The specific implementation methods and principles of each step of the rule processing method M500 can be referred to above and will not be repeated here.

[0078] Figure 6It is a schematic block diagram of the structure of a rule processing method device according to an embodiment of the present invention.

[0079] refer to Figure 6 , showing a rule processing method device, the device is Figure 1 The processor of the server 100 in the rule processing method device includes: a judgment module 610, which is used to determine whether the first rule is in a compatible mode, and the first rule is the latest sales rule for the product; a configuration module 620, which is used to configure a delay period for the second rule when the first rule is delayed to take effect, and the second rule is the original sales rule for the product. The generation time of the second rule is earlier than the generation time of the first rule, and the second rule can be used to sell the product during the delay period; and a corresponding module 630, which is used to determine that the second rule is invalid when the delay period ends, and the invalid second rule cannot be used to sell the product.

[0080] The judgment module 610 executes step S610 to determine whether the first rule is in compatible mode. When the first rule is in compatible mode, the judgment module 610 synchronizes the message to the configuration module 620. The configuration module 620 executes step S602 to configure a delay period for the second rule, and synchronizes the delay period to the response module 630. The response module 630 executes step S603 to determine whether the delay period ends. If the delay period ends, the response module executes step S604 to set the lock token of the second rule to invalid. During the delay period, the user interface displays the first rule, and the target user can select the first rule or the second rule at the same time, and purchase products according to the discounts or rights of the corresponding rules; after the extension period ends, the user interface displays the first rule and can only select the first rule, and purchase products according to the first rule.

[0081] In some embodiments, when the first rule is in compatible mode, it also includes: configuring the lock token of the second rule to take effect. When the lock token takes effect, the second rule can be used to sell the product, and the lock token is used to represent the effectiveness of the corresponding sales rule.

[0082] In some implementations, when the delay period ends, determining the second rule as invalid includes: when the delay period ends, setting a lock token of the second rule to be invalid, and the second rule is invalid when the lock token is invalid.

[0083] In some implementations, when the first rule is in a compatible mode, the method further includes: writing the delayed tasks of the second rule into a delayed queue, where the delayed queue is used to manage the delayed tasks of the sales rule.

[0084] In some embodiments, when the delay period ends, the second rule is determined to be invalid, including: when the delay queue monitors the end of the delay period of the second rule, writing the rule identifier of the second rule into the target queue, the target queue is used to record the rule identifier of the sales rule at the end of the delay period; and when the target queue records the rule identifier of the second rule, determining the lock token of the second rule as invalid in the rule database, so that the second rule is invalid. The rule database is used to record the sales rules.

[0085] In some embodiments, after determining the second rule to be invalid, the method includes: assigning a first version number to a rule set including the first rule and the invalid second rule in a rule database, and writing the first version number to a first storage unit, the first storage unit being used to record the latest version number of the rule set in the rule database, the rule set including multiple sales rules for the product and the effectiveness of each sales rule.

[0086] In some implementations, the method further includes: copying the rule set in the rule database to a second storage unit, where the valid sales rules in the second storage unit can be used to sell products.

[0087] In some implementations, the further step includes: when the version number of the rule set in the second storage unit is inconsistent with the version number recorded in the first storage unit, updating the rule set in the second storage unit according to the rule database.

[0088] In some implementations, it also includes: determining whether the delay period of the second rule in the rule database for locking the token to be effective has ended according to the current time; and adjusting the locking token of the second rule at the end of the delay period to be invalid, making the second rule invalid.

[0089] In some embodiments, when the first rule is in a compatible mode, the first rule is displayed on the user interface, and the second rule is not displayed, and both the first rule and the second rule are valid during the delay period. The user interface is a display interface of the client. In some embodiments, when the first rule is in a compatible mode, it also includes: determining a target user of the second rule, the target user is a user who has viewed the second rule through the user interface when the second rule is displayed on the user interface, and the second rule is valid for the target user during the delay period.

[0090] In some implementations, when the second rule is displayed on the target interface, it includes: configuring a read mark for a user who views the second rule through the target interface, and the user with the read mark is the target user of the second rule.

[0091] Through the above-mentioned device, by setting a delay period for the second rule and setting the lock token to take effect, the first rule can be written into the database in time, and the second rule has some buffer time before it becomes invalid, which ensures that the target user who sees the rule can achieve the effect of "what you see is what you get" within a certain period of time. In addition, by actively monitoring whether the difference between the current time and the time when the first rule is written into the database is greater than the length of the delay period of the second rule when the lock token takes effect, the sales rules that cannot be invalidated in time due to the end of the delay period in abnormal conditions such as accidental restart or malicious attack of the sales system are avoided, and the losses caused by these rules that fail to be invalidated in time are avoided.

[0092] The execution subject of the rule processing method in the specific implementation manner of the present disclosure may be an electronic device such as a mobile phone, a tablet computer, or a server.

[0093] Therefore, based on any of the above embodiments, the present disclosure further provides an electronic device, which can execute the rule processing method of any of the above embodiments of the present disclosure, and the rule processing device of any of the above embodiments can be configured on the electronic device.

[0094] Figure 7 It is a schematic block diagram of the structure of an electronic device equipped with a rule processing method device according to an embodiment of the present disclosure.

[0095] The hardware structure of the electronic device 7000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 7100 connects various circuits including one or more processors 7200, memory 7300 and / or hardware modules together. The bus 7100 can also connect various other circuits 7400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0096] The bus 7100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. A bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one connecting line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0097] The electronic device proposed in the present disclosure sets a delay period for the second rule and sets the lock token to take effect, so that the first rule can be written into the database in time, and the second rule has some buffer time before it becomes invalid, thereby ensuring that the target user who sees the rule can achieve the "what you see is what you get" effect within a certain period of time. In addition, by actively monitoring whether the difference between the current time and the time when the first rule is written into the database is greater than the length of the delay period of the second rule when the lock token takes effect, the sales rules that cannot be invalidated in time due to the end of the delay period in abnormal conditions such as accidental restart or malicious attack of the sales system are avoided, thereby avoiding the losses caused by these rules that fail to be invalidated in time.

[0098] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0099] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.

[0100] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0101] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0102] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0103] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0105] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.

[0106] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0107] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

[0108] It is understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, and usage scenarios of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. For example, in response to receiving the user's active request, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require the acquisition and use of the user's personal information. The user can autonomously choose whether to provide personal information to the software or hardware such as the terminal 200, application, server or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message. As an optional but non-limiting implementation method, in response to receiving the user's active request, the method of sending the prompt message to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the terminal 200. The above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation method of the present disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present disclosure. At the same time, it can be understood that the data involved in the technical solution of the present disclosure (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

Claims

1. A rule processing method, characterized in that: include: determining whether a first rule is a compatible mode, wherein the first rule is a latest sales rule for a product; When the first rule is in a compatible mode, a delay period is configured for a second rule, the second rule is an existing sales rule for the product, the generation time of the second rule is earlier than the generation time of the first rule, and the second rule can be used to sell the product during the delay period; as well as In the case where the delay period ends, the second rule is determined to be invalid, and the invalid second rule cannot be used to sell the product.

2. The rule processing method according to claim 1, characterized in that: When the first rule is a compatible mode, it also includes: The locking token of the second rule is configured to be effective. When the locking token is effective, the second rule can be used to sell the product. The locking token is used to represent the effectiveness of the corresponding sales rule.

3. The rule processing method according to claim 2, characterized in that: When the delay period ends, determining the second rule as invalid comprises: When the delay period ends, the lock token of the second rule is set to be invalid, and the second rule is invalid when the lock token is invalid.

4. The rule processing method according to claim 1, characterized in that: When the first rule is a compatible mode, it also includes: The delayed tasks of the second rule are written into a delay queue, where the delay queue is used to manage the delayed tasks of the sales rule.

5. The rule processing method according to claim 4, characterized in that: When the delay period ends, determining the second rule as invalid comprises: When the delay queue detects that the delay period of the second rule ends, the rule identifier of the second rule is written into the target queue, and the target queue is used to record the rule identifier of the sales rule at the end of the delay period; and When the target queue records the rule identifier of the second rule, the lock token of the second rule is determined to be invalid in the rule database, so that the second rule is invalid. The rule database is used to record sales rules.

6. The rule processing method according to claim 5, characterized in that: After determining that the second rule is invalid, the method further comprises: In the rule database, a first version number is assigned to a rule set including the first rule and the invalid second rule, and the first version number is written into a first storage unit, which is used to record the latest version number of the rule set in the rule database, wherein the rule set includes multiple sales rules for the product and the effectiveness of each sales rule.

7. The rule processing method according to claim 1, characterized in that: Also includes: The rule set in the rule database is copied to the second storage unit, and the sales rules valid in the second storage unit can be used to sell the product.

8. The rule processing method according to claim 1, characterized in that: Also includes: When the version number of the rule set in the second storage unit is inconsistent with the version number recorded in the first storage unit, the rule set in the second storage unit is updated according to the rule database.

9. The rule processing method according to claim 1, characterized in that: Also includes: Determine, according to the current time, whether the delay period of the second rule in the rule database for locking the token to be effective has ended; as well as The lock token of the second rule at the end of the delay period is adjusted to be invalid, so that the second rule is invalid.

10. The rule processing method according to claim 1, characterized in that: When the first rule is in a compatible mode, the first rule is displayed on the user interface, and the second rule is canceled, and the first rule is valid during the delay period.

11. The rule processing method according to any one of claims 1 to 10, characterized in that: When the first rule is a compatible mode, it also includes: A target user of the second rule is determined, where the target user is a user who has viewed the second rule through the user interface when the second rule is displayed on the user interface, and the second rule is valid for the target user during the delay period.

12. The rule processing method according to claim 11, characterized in that: When the second rule is displayed on the target interface, it includes: A read mark is configured for a user who views the second rule through the target interface, and the user with the read mark is the target user of the second rule.

13. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the rule processing method according to any one of claims 1 to 12.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the rule processing method according to any one of claims 1 to 12 is implemented.