A page display method, device, business server and storage medium
By monitoring access events and obtaining the data reading strategy for target items, important business data is read first, solving the problem of item details page being unable to be displayed under the flow control mechanism, and improving user experience and the probability of item release.
Patent Information
- Application Number
- CN202110097475.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-25
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-01-25
AI Technical Summary
In the existing technology, after the current limiting mechanism is triggered, the server cannot effectively display the item details page, resulting in a decrease in user experience and the probability of item release.
By monitoring access trigger events, determining whether the item to be accessed is the target item, and obtaining the data reading strategy of its item details page, important business data is read first, reducing the pressure on the business server and cache server, thereby achieving effective display.
It achieves effective display of item details page, improves user experience and item delivery probability, avoids server downtime, and improves service availability and high concurrent access processing capabilities.
Smart Images

Figure CN113761420B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a page display method, device, service server, and storage medium. Background Art
[0002] Existing e-commerce models employ a variety of activities designed to increase the probability of an item being released from storage. For example, during an activity, operators can use the e-commerce system to push a promotional message about a specific item in advance to a fixed number of users or users of a fixed level, or even to all users on the entire network. For example, a promotional message about a certain item being available at 10:00 AM and below market value is likely to be available. Users who receive the promotional message are likely to visit the item's details page around 10:00 AM to retrieve it. This means the e-commerce system needs to display the item details page to a large number of users within a few seconds. Consequently, the query per second (QPS) for the item details page is likely to exceed the threshold that the e-commerce system's server can withstand, causing the server to crash.
[0003] To solve this problem, existing technologies mainly use a current limiting mechanism, which queues the server when the server QPS reaches a threshold. That is, the server temporarily stops displaying the item details page to subsequent users, thereby avoiding possible server downtime.
[0004] In the process of implementing the present invention, the inventors discovered that the following technical problems exist in the prior art: after the current limiting mechanism is triggered, the server cannot display the item details page of any item, which will have a significant impact on the user experience and the probability of item release. Summary of the Invention
[0005] The embodiments of the present invention provide a page display method, device, service server and storage medium, which solve the problem that item detail pages cannot be effectively displayed.
[0006] In a first aspect, an embodiment of the present invention provides a page display method, which is applied to a business server and may include:
[0007] When an access trigger event of an access page is detected, access information corresponding to the access trigger event is obtained, and whether the item to be accessed corresponding to the access information is a target item;
[0008] If so, obtain the data reading strategy of each business data in the item details page where the target item is located, and read the corresponding business data based on each data reading strategy;
[0009] The read business data is sent to the business client, so that the business client displays the item details page according to the received business data.
[0010] In a second aspect, an embodiment of the present invention further provides a page display device, which is configured on a business server and may include:
[0011] An item determination module is used to obtain access information corresponding to the access trigger event when monitoring an access trigger event of an access page, and determine whether the item to be accessed corresponding to the access information is a target item;
[0012] A data reading module is configured to obtain a data reading strategy for each business data in the item details page where the target item is located, and read the corresponding business data based on each data reading strategy;
[0013] The page display module is used to send the read business data to the business client, so that the business client can display the item details page according to the received business data.
[0014] In a third aspect, an embodiment of the present invention further provides a service server, which may include:
[0015] one or more processors;
[0016] a memory for storing one or more programs;
[0017] When one or more programs are executed by one or more processors, the one or more processors implement the page display method provided by any embodiment of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the page display method provided by any embodiment of the present invention.
[0019] The technical solution of the embodiment of the present invention can determine whether the item to be accessed corresponding to the access information is the target item by obtaining access information corresponding to the access trigger event monitored for accessing the page. In this way, the target item that may cause the business server to crash can be obtained from each item to be accessed. If the item to be accessed is the target item, the data reading strategy of each business data in the item details page where the target item is located can be obtained, and the corresponding business data can be read based on each data reading strategy. In this way, the business data that is important to the triggering user can be read in a manner that does not cause excessive pressure on the business server and / or the cache server connected to the business server. Then, the read business data is sent to the business client so that the business client displays the item details page according to the received business data. The above technical solution completes the reading of the business data that needs to be read by obtaining the data reading strategy of each business data in the item details page where the target item is located that may cause the business server to crash, thereby achieving the effect of effectively displaying the item details page and further achieving the effect of enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flow chart of a page display method in embodiment 1 of the present invention;
[0021] Figure 2 This is a schematic diagram of an optional example of a page display method in the first embodiment of the present invention;
[0022] Figure 3 This is a flow chart of a page display method in Embodiment 2 of the present invention;
[0023] Figure 4 This is a schematic diagram of an optional example of a page display method in the second embodiment of the present invention;
[0024] Figure 5 This is a flow chart of a page display method in Embodiment 3 of the present invention;
[0025] Figure 6 This is a flow chart of a page display method in Embodiment 4 of the present invention;
[0026] Figure 7 This is a schematic diagram of an optional example of a page display method in the fourth embodiment of the present invention;
[0027] Figure 8 This is a flowchart of an optional example of a page display method in the fourth embodiment of the present invention;
[0028] Figure 9 This is a structural block diagram of a page display device in Embodiment 5 of the present invention;
[0029] Figure 10 This is a structural diagram of a service server in Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0030] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0031] Before introducing the embodiments of the present invention, the application scenarios of the embodiments of the present invention are first exemplified: if the instantaneous number of visits to a certain item, or the QPS of the item details page where it is located, may exceed the threshold that the server where the e-commerce system is located can bear, such an item can be called a target item or a hot item. It should be noted that the existing flow limiting mechanism is often a service for the item details pages of all items, rather than for a fixed stock keeping unit (SKU) or Internet Protocol (IP) address. This means that when the number of visits to hot items exceeds the threshold, it will play a decisive protective role for the server. However, other items, even 99% of the items, did not participate in this activity. These items are also within the flow limiting mechanism, which makes it impossible for users to access the item details page of any item, and the user experience and the probability of item shipment are very poor.
[0032] In order to solve the above problems, various embodiments of the present invention propose the following page display method.
[0033] Example 1
[0034] Figure 1 This is a flow chart of a page display method provided in Example 1 of the present invention. This embodiment is applicable to displaying item detail pages, and is particularly suitable for reading business data based on matching with the business data on the target item's item detail page to ensure the effective display of each item detail page. This method can be performed by the page display device provided in this embodiment of the present invention. This device can be implemented in software and / or hardware and can be integrated into a business server.
[0035] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0036] S110 . When an access triggering event of an access page is detected, access information corresponding to the access triggering event is obtained, and it is determined whether the to-be-accessed item corresponding to the access information is a target item.
[0037] The access trigger event may be an event that triggers a user to access a corresponding item details page through a business client. For example, when the business client detects a click trigger event in which a page link is clicked, it may send the corresponding page link to the business server so that the business server detects the access trigger event corresponding to the page link. The access information may be information related to the item details page to be accessed by the user, the item (i.e., the item to be accessed), the business server, etc. corresponding to the access trigger event, such as the page link of the item details page, the item information to be accessed of the item to be accessed, the occupancy status information of the business server, etc. The item details page may be a page that provides detailed information about the item to be accessed, provides information such as access channels, and the business server may be a server that obtains various business data required for the item details page and sends the business data to the business client.
[0038] Furthermore, the target item may be an item whose instantaneous visit volume, or the QPS of the item details page where it is located, may exceed the threshold that the business server can bear. Such an item may also be called a hot item. There are many ways to determine whether the item to be accessed corresponding to the access information is the target item. For example, the item determination strategy for determining the target item based on the access information is written into the business code or the item determination strategy is written into the script through a rule engine. Thus, the item determination strategy can be obtained by calling the corresponding business code or script, and then whether the item to be accessed is the target item is determined based on the matching degree between the access information and the item determination strategy. It should be noted that the business code can be the main code in the business server used to process various business logics in the item details page, and the script is a file that is not coupled with the business code and can be configured through the background management. The configuration process does not require stopping the execution of the business code, and has good flexibility.
[0039] S120: If yes, obtain the data reading strategy of each business data in the item details page where the target item is located, and read the corresponding business data based on each data reading strategy.
[0040] The item details page may include multiple business data items, such as main image data, title data, price data, reservation data, pre-sale data, flash sale data, promotion data, review data, customer service data, and so on. Each piece of business data may have a corresponding data read policy. This data read policy may define how the business data is read, such as whether to read the business data and from which channel. Based on this, if the item to be accessed is a target item, the data read policy for each piece of business data on the item details page where the target item is located may be obtained, and the corresponding business data may be read based on each data read policy. Exemplarily, the data read policy may be obtained by calling business code or a script. This script may be a file that pre-configures the data read policy through a rules engine. As another example, taking a piece of business data as an example, whether to read the business data may be determined based on its corresponding data read policy. If so, the data read policy may then determine from which channel the business data is read, such as directly from a cache location on a business server or from a cache server connected to the business server. The cache server may store cache data corresponding to each piece of business data.
[0041] The significance of the above steps is that, since the target item is an item that may cause the business server to crash, the crash of the business server means that the item details page of any target item or ordinary item to be accessed cannot be displayed. In order to avoid this situation, when the item to be accessed is a target item, the business data can be read according to the importance of each business data relative to the triggering user. The triggering user can be the user who triggers the access triggering event, such as only reading the business data that is more important to the triggering user, and reading the business data that can be read from the business server directly from the business server, that is, minimizing the information interaction between the business server and the cache server, thereby ensuring the normal operation of the cache server, because the normal operation of the cache server is an effective guarantee for the normal operation of the business server, thereby achieving the effect that the item details page of any item to be accessed (that is, the target item and the item to be accessed other than the target item) can be effectively displayed.
[0042] On this basis, optionally, for those items to be accessed that are not target items, since their instantaneous access volume, or the QPS of the item details page where they are located, will not exceed the threshold that the business server can bear, that is, it will not cause the business server to crash, all business data in the item details page where the item to be accessed is located can be read, so as to provide the user with a complete item details page, so that the user can have a detailed understanding of the item to be accessed based on the item details page.
[0043] S130: Send the read business data to the business client, so that the business client displays the item details page according to the received business data.
[0044] The business data retrieved may include all the business data on the item details page, or data that is particularly important to the user who triggered the activity. This is because only a portion of the business data for a target item in a particular activity, such as the target item's acquisition channel, value, and inventory level, is relevant to the user who triggered the activity. Therefore, only this business data may be retrieved. The retrieved business data is sent to the user's business client connected to the business server, so that the business client displays the item details page based on the received business data.
[0045] It should be noted that the above page display method can be applied to a business server, which can be a stand-alone server or a server cluster. In the case of a stand-alone server, the stand-alone server is used as the execution entity to determine whether to control the reading process of each business data corresponding to the target item, thereby improving the utilization rate of the central processing unit (CPU) and memory of the stand-alone server.
[0046] The technical solution of the embodiment of the present invention can determine whether the item to be accessed corresponding to the access information is a target item by obtaining access information corresponding to the access trigger event monitored for accessing the page. This allows the target item to be obtained from each item to be accessed that may cause the business server to crash. If the item to be accessed is a target item, the data reading strategy for each business data in the item details page where the target item is located can be obtained, and the corresponding business data can be read based on each data reading strategy. This allows the business data that is important to the triggering user to be read in a manner that does not place excessive pressure on the business server and / or the cache server communicating with the business server. Furthermore, the read business data is sent to the business client so that the business client displays the item details page based on the received business data. The above technical solution completes the reading of the business data that needs to be read by obtaining the data reading strategy for each business data in the item details page where the target item is located that may cause the business server to crash, thereby achieving the effect of effectively displaying the item details page, further achieving the effect of enhancing the user experience and increasing the effect of attracting new users.
[0047] An optional technical solution, based on this, optionally, if the access trigger event is triggered, then obtaining the data reading strategy for each business data item on the item details page where the target item is located, may include: if the access trigger event is triggered, determining whether the number of times the access trigger event has been triggered exceeds a preset threshold; if not, obtaining the data reading strategy for each business data item on the item details page where the target item is located; otherwise, sending a preset identifier to the business client, so that the business client displays a queue prompt after receiving the preset identifier. If the item to be accessed is the target item, whether the access trigger event has been triggered exceeds the preset threshold may also be used to determine whether the incoming access trigger event is likely to cause the business server to crash. If it is not likely to cause the business server to crash, the corresponding business data may be read. However, if it is likely to cause the business server to crash, the business data corresponding to the access trigger event may not be read, and the preset identifier may be directly sent to the business client, so that the business client displays a queue prompt after receiving the preset identifier. This ensures the normal operation of the business server through current limiting. Of course, for those items to be accessed that are not the target items, the access needs of the items to be accessed can still be processed, thereby ensuring the normal operation of the business server, and achieving the effect of normal display of the item details page of those items to be accessed that are not involved in the event. In addition, considering that some activities require users who have made reservations in advance to be eligible to participate in the activities, if the number of reservations has exceeded the number of people that the business server can carry, then there is a high probability that the business server will crash during the activity. Therefore, when the number of reservations exceeds the preset reservation threshold, the above-mentioned flow limiting means can also be used to ensure the normal operation of the business server, thereby ensuring that users who have successfully made reservations can successfully access the corresponding item details page during the activity.
[0048] Optionally, based on the above technical solution, after the above technical solution is configured, the method may further include: obtaining the information receiving mode of the pre-configured alarm receiving object, and sending the alarm information to the alarm receiving object based on the information receiving mode. The alarm receiving object may be an object that needs to receive the alarm information, and the information receiving mode may be a mode in which the alarm receiving object can receive the alarm information. For example, Figure 2 As shown, these can include alarm cycles, notification methods, and more. These can be pre-configured through the rule engine. The benefit of the above scheme is that, when the item to be accessed is a target item, especially when the e-commerce system is not aware of the possibility of the target item, the possibility of a business server downtime can be promptly reported to the alarm recipient, allowing the alarm recipient to promptly monitor the working status of the business server, proactively change the corresponding configuration, and so on to ensure the normal operation of the business server. This provides a good way to monetize the impact of target items on services and alarms.
[0049] Example 2
[0050] Figure 3 This is a flow chart of a page display method provided in Example 2 of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, determining whether the item to be accessed corresponding to the access information is the target item may include: invoking a pre-configured item determination script to obtain an item determination policy; matching the access information with the item determination policy to determine whether the item to be accessed corresponding to the access information is the target item. Explanations of terms that are identical or corresponding to those in the above-mentioned embodiments are not repeated here.
[0051] See also Figure 3 The method of this embodiment may specifically include the following steps:
[0052] S210: When an access triggering event of accessing a page is detected, access information corresponding to the access triggering event is obtained.
[0053] S220: Call a pre-configured item determination script to obtain an item determination strategy; match the access information with the item determination strategy to determine whether the item to be accessed corresponding to the access information is the target item.
[0054] The item determination script is a preconfigured script based on the rules engine. The process of invoking the preconfigured item determination script to obtain the item determination policy is equivalent to the process of obtaining the item determination policy by applying the corresponding rules engine. The item determination policy can be configured in the item determination script to determine whether the item to be accessed corresponding to the access information is the target item. It can set the type of access information corresponding to the item to be accessed that is considered the target item. Therefore, if the item determination policy contains content that matches the access information, the item to be accessed corresponding to the access information is considered the target item.
[0055] It should be noted that the rule engine can be a component embedded in the application, which achieves the effect of separating business decisions from the application's business code and writing business decisions based on pre-defined semantic modules. That is, based on the rule engine, certain business logic can be extracted from the business code and made configurable. In actual applications, the above rule engine can optionally be Drools, rete, MVEL, etc., where MVEL is the abbreviation of MVFLEX Expression Language. Compared with other rule engines, it has higher flexibility and can define scripts such as thresholds and business based on scripts. It should be noted that the advantage of pre-configuring item determination strategies through scripts is that the script writing process does not need to be embedded in the business code, and when the script changes, the script can be directly modified without going online. This will not have any impact on the implementation process of the business code, thereby reducing the coupling between the business code and the item determination script, which is conducive to the maintenance and expansion of the item determination script.
[0056] S230: If yes, obtain the data reading strategy of each business data in the item details page where the target item is located, and read the corresponding business data based on each data reading strategy.
[0057] S240: Send the read business data to the business client, so that the business client displays the item details page according to the received business data.
[0058] The technical solution of the embodiment of the present invention obtains the item determination strategy by calling a pre-configured item determination script, and determines whether the item to be accessed corresponding to the access information is the target item based on the match between the access information and the item determination strategy. It uses a rule engine to dynamically create various styles of item determination scripts based on actual conditions, dynamically update the item determination scripts, and take effect in real time. That is, relevant personnel can change the item determination script at any time, and after the item determination script is changed, the changed item determination script can be executed immediately without modifying the business code or suspending the execution of the business code. The two are independent of each other, thereby achieving the effect of real-time identification of target items based on dynamic configuration. In addition, the use of rich scripts and rules through the rule engine can also improve service high availability and item acquisition conversion rate.
[0059] On this basis, optionally, the access information may include the item information to be accessed of the item to be accessed corresponding to the access information and / or the occupancy status information of the item to be accessed on the business server, wherein the item information to be accessed may be the attribute information of the item to be accessed, and the attribute information may be unique identification information such as SKU, identity identification number (ID), etc., or it may be attribute compensation information such as whether it is self-operated, whether it is global shopping, whether it is reserved, whether it is pre-sold, whether it is a flash sale, whether it is a flash sale, etc.; the occupancy status information may be information related to the occupancy status of the business server's own resources by the item to be accessed, such as CPU occupancy rate, memory occupancy rate, etc.
[0060] Accordingly, matching the access information with the item determination strategy to determine whether the item to be accessed corresponding to the access information is the target item may include: obtaining the target item information of the pre-configured target item and / or the target state information of the business server in the target state based on the item determination strategy; determining whether the item to be accessed is the target item based on the item information to be accessed and the target item information, and / or the occupancy state information and the target state information. The target item information may be the attribute information of the pre-configured target item. If the item information to be accessed is a certain item in the target item information, the item to be accessed may be used as the target item. For example, Figure 4 As shown, a specific item can be uniquely identified based on the unique identification information. Therefore, whether the item to be accessed is the target item can be determined based on the unique identification information. The item ID of the target item is preconfigured. The target status information can be preconfigured information related to the resource occupancy status of a business server in the target state. A business server in the target state can be a server that is likely to experience downtime. Therefore, when the occupancy status information is a certain status information within the target status information, it indicates that the business server is already in the target state, and the item to be accessed is the target item. Furthermore, whether the item to be accessed is the target item can also be determined based on the target item information and the target item information, as well as the occupancy status information and the target status information. This configuration is based on the fact that, given that the e-commerce system may not know the unique identification information of the target item in advance, it cannot directly determine whether the item to be accessed is the target item based on the unique identification information of the item to be accessed. In this case, the attribute compensation information and the occupancy status information in the item to be accessed information can be used to jointly determine whether the item to be accessed is the target item. The above technical solution can employ different schemes to identify whether the item to be accessed is the target item for different situations, thereby achieving accurate identification of the target item.
[0061] Example 3
[0062] Figure 5This is a flow chart of a page display method provided in Example 3 of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, obtaining the data reading strategy for each business data item on the item details page where the target item resides may include: invoking a pre-configured data reading script corresponding to the item details page where the target item resides, and obtaining the data reading strategy for each business data item on the item details page. Explanations of terms that are identical or corresponding to those in the above-mentioned embodiments are not repeated here.
[0063] See also Figure 5 The method of this embodiment may specifically include the following steps:
[0064] S310: When an access triggering event of an access page is detected, access information corresponding to the access triggering event is obtained, and it is determined whether the to-be-accessed item corresponding to the access information is a target item.
[0065] S320: If yes, call the pre-configured data reading script corresponding to the item details page where the target item is located, obtain the data reading strategy of each business data in the item details page, and read the corresponding business data based on each data reading strategy.
[0066] The data reading script can be a script pre-configured by the rules engine that corresponds to the item details page. The process of invoking the pre-configured data reading script to obtain the data reading policy is equivalent to the process of obtaining the data reading policy by applying the corresponding rules engine. The data reading policy can be a policy configured in the data reading script for reading corresponding business data, which can specify the method for reading various business data. Furthermore, the specific effects of creating and obtaining data reading policies through the rules engine are similar to those of determining and obtaining object determination policies through the rules engine, and will not be further elaborated here.
[0067] S330: Send the read business data to the business client, so that the business client displays the item details page according to the received business data.
[0068] The technical solution of the embodiment of the present invention obtains the data reading strategy by calling a pre-configured data reading script. It uses a rule engine to dynamically create various data reading scripts according to actual conditions, dynamically update the data reading script and make it effective in real time. That is, relevant personnel can change the data reading script at any time, and after the data reading script is changed, the changed data reading script can be executed immediately without modifying the business code and suspending the execution of the business code. The two are independent of each other, thereby achieving the effect of obtaining a data reading strategy based on dynamic configuration.
[0069] On this basis, the above-mentioned page display method may further include: when an adjustment trigger event of an adjustment script is detected, obtaining the data reading script to be adjusted and the adjustment operation corresponding to the adjustment trigger event; adjusting the data reading script to be adjusted based on the adjustment operation, and updating the data reading script to be adjusted based on the adjustment result. The adjustment operation is an operation to adjust the data reading script to be adjusted, such as modification, addition, deletion, etc. Since the data reading script is a script pre-configured based on the rule engine, after the data reading script to be adjusted is adjusted, the adjusted data reading script can be immediately updated and executed, thereby achieving the adjustment effect of decoupling the data reading script from the business code.
[0070] Example 4
[0071] Figure 6 This is a flowchart of a page display method provided in Example 4 of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, reading corresponding business data based on each data reading strategy may specifically include: determining the data to be read in each business data based on each data reading strategy, and reading the data to be read. The explanations of terms that are the same as or corresponding to the above-mentioned embodiments are not repeated here.
[0072] See also Figure 6 The method of this embodiment may specifically include the following steps:
[0073] S410: When an access triggering event of an access page is detected, access information corresponding to the access triggering event is obtained, and it is determined whether the to-be-accessed item corresponding to the access information is a target item.
[0074] S420: If yes, obtain the data reading strategy of each business data in the item details page where the target item is located, determine the data to be read in each business data based on each data reading strategy, and read the data to be read.
[0075] Considering that the importance of various business data on the item details page of the target item to the triggered user varies during an activity, for example, in a grab interaction, the target item's acquisition channel, value, inventory, etc. are more important to the triggered user, while the advertising information is unimportant to the triggered user. Therefore, based on each data reading strategy, the data to be read in each business data can be determined. This data to be read is the data in each business data that is more important to the triggered user, and then this data to be read is read, while the business data other than the data to be read in the business data is no longer read and displayed.
[0076] On this basis, optionally, as mentioned above, the data reading strategy can be obtained based on the call of the data reading script, and the process of determining the data to be read can be understood as the process of downgrading the business data, which means that the rule engine can be used to downgrade certain business data in the item details page where the target item is located, dynamically control the up and down lines of floors, that is, dynamically control the up and down lines of the display positions of each business data in the item details page, and provide targeted protection for services unrelated to the target item, thereby improving the effective call rate and service availability of the target item, and thus improving the user experience. In actual applications, optionally, the addition or deletion of data to be read can be achieved by adding or deleting corresponding businesses. For example, Figure 7 As shown, when a click trigger event is detected in which a button for adding or deleting a service is clicked, the added or deleted data (i.e., certain service data) and the added or deleted operation corresponding to the click trigger event can be determined, and based on the added or deleted operation, the added or deleted data can be treated as data to be read, or deleted from the data to be read.
[0077] S430: Send the read business data to the business client, so that the business client displays the item details page according to the received business data.
[0078] The technical solution of the embodiment of the present invention determines the data to be read in each business data through various data reading strategies, and then reads the data to be read. This means that there is no need to read each business data from the cache server, and only the data to be read that is more important to the triggered user needs to be read. This reduces the information interaction between the business server and the cache server, and achieves the effect of effective calling of the target item through the effective degradation of business data.
[0079] Considering that if most of the same business data reads the corresponding cache data from the cache server, this can meet the demand for high concurrent access as much as possible. However, the number of visits to the target item is likely to cause the QPS of the cache server to instantly exceed the threshold that the cache server can withstand. In addition, the business data related to the target item is mostly fixed, which means that these business data are often fixedly stored on a cache shard in the cache server. For such a cache shard, its instantaneous traffic will double the pressure on the cache server. The sudden increase in the number of links will eventually lead to downtime. The cache service cannot obtain the business data and turns to the database for query. This makes the database even more difficult to support, and each business server is in an avalanche state. After the entire service crashes, the item details page loads too slowly or cannot be displayed. This will directly affect the user experience and trigger a large number of complaints. The crash of the item details page may even reduce the probability of obtaining the target item.
[0080] To address this issue, an optional technical solution is to determine the data to be read in each business data based on each data reading strategy and read the data to be read. Specifically, this solution may include: determining the data to be read in each business data and the reading channel for each data to be read based on each data reading strategy, and reading the corresponding data to be read based on the reading channel. That is, in addition to determining the data to be read in each business data based on each data reading strategy, the reading channel for each business data can also be determined. The reading channel can indicate the channel from which the data to be read is read, and then the corresponding data to be read is read based on the reading channel. For example, if the data to be read is business data that changes in real time during an activity, such as inventory, then the corresponding reading channel can be interface reading. The data to be read is read from the cache server based on the data reading interface corresponding to the data to be read, thereby obtaining the most accurate data to be read at the current moment. Of course, if the data to be read is business data that remains unchanged during an activity, such as value attributes or acquisition channels, then the corresponding reading channel can be local reading. The cache location of the data to be read in the business server is determined and the data to be read is read from the cache location. In practical applications, the reading channel of the data to be read can be pre-configured through the rule engine, that is, the local cache switching of the data to be read can be realized with the help of the rule engine, and the service can be dynamically downgraded, thereby improving service availability and enhancing user experience. Figure 7 As shown, the business name can be the name of the business data. When a click trigger event is detected in which the script button is clicked, the script related to the reading channel of the data to be read corresponding to the click trigger event can be displayed, and the script can be modified according to the corresponding modification operation, thereby achieving the effect of dynamic configuration and dynamic change of the reading channel.
[0081] The advantage of the above scheme is that, assuming that a certain item details page needs to call N data reading interfaces in order to realize the normal display of the item details page, for the target item, the calls of M of these N data reading interfaces are valid calls, that is, the business data obtained by calling these M data reading interfaces are the data to be read that is important to the triggered user. On this basis, O of the M data to be read are business data that changes in real time during the activity, which means that these O data to be read need to be obtained by calling the corresponding data reading interface, and the remaining MO data to be read can be read directly from the business server. In this way, the number of N data reading interfaces that need to be called by a single access trigger event is reduced to O data reading interfaces. The significant reduction in the number of calls to the data reading interface has greatly alleviated the usage pressure of the cache server and reduced the number of links between the cache server and the business server, thereby ensuring the normal operation of the cache server.
[0082] On this basis, optionally, considering that the data to be read stored in the business server is also read from the cache server, this means that the data to be read cannot be read from the business server during hot start. Therefore, when reading the data to be read from the cache location, you can first determine whether the data to be read is cached in the cache location. If so, you can read it directly. Otherwise, you can read the data to be read from the cache server based on the data reading interface, and cache the read data to be read in the cache location to prepare for the next time the data to be read is read from the cache location.
[0083] In order to better understand the specific implementation process of each of the above steps, the page display method described in each embodiment is exemplarily described below with reference to specific examples. Figure 8 As shown, after receiving an access trigger event (i.e., a user request) triggered by a user, the MVEL rule engine determines whether the corresponding access information matches the target status information in the pre-configured item determination policy. If not, the corresponding item to be accessed is not the target item and can be accessed normally. If so, the access information can be further determined to match the attribute compensation information in the item determination policy. If not, the corresponding item to be accessed is not the target item and can be accessed normally. Otherwise, the item to be accessed is determined to be the target item. If the item to be accessed is the target item, an alarm message can be sent, and based on the number of access trigger event triggers, a determination is made as to whether a rate limiting mechanism should be enabled. If so, access is terminated and a preset identifier (code) is returned to the service client to prompt the service client to queue. Otherwise, for each piece of business data on the item details page where the target item is located, the MVEL rule engine determines whether the business data needs to be retained (i.e., whether the business data needs to be read). If not, the corresponding data read interface is no longer called to read the data. Otherwise, a further determination is made as to whether cached data for the business data is stored in the service server. If so, the cache data can be read directly from the business server, otherwise the cache data can be read from the corresponding data reading interface and cached in the local cache. The business data read are assembled, and the assembly results are sent to the business client, so that the business client displays the item details page according to the received assembly results. The above example can be implemented in the background management page through the rule engine to configure the threshold, policy and other data, thereby reducing the coupling of the business code and improving the maintainability and scalability. Specifically, it can configure the corresponding cache and expiration time according to different business data in the background management page, configure the preset threshold of the item access volume and the alarm recipient object, and configure the corresponding business data that must be read according to the activity scenario, thereby achieving the effect of effective call, cache protection and flow limiting of the target item.
[0084] Example 5
[0085] Figure 9 This is a structural block diagram of the page display device provided in the fifth embodiment of the present invention. The device can be configured in a business server and can be used to execute the page display method provided in any of the above embodiments. The device and the page display method of the above embodiments belong to the same inventive concept. For details not fully described in the embodiment of the page display device, please refer to the embodiment of the above page display method. Figure 9 The device may specifically include: an item determination module 510, a data reading module 520 and a page display module 530.
[0086] The item determination module 510 is configured to, upon detecting an access trigger event of an access page, obtain access information corresponding to the access trigger event and determine whether the item to be accessed corresponding to the access information is a target item;
[0087] A data reading module 520 is configured to obtain a data reading strategy for each business data in the item details page where the target item is located, and read the corresponding business data based on each data reading strategy;
[0088] The page display module 530 is used to send the read business data to the business client, so that the business client can display the item details page according to the received business data.
[0089] Optionally, the item determination module 510 may specifically include:
[0090] A strategy obtaining unit is used to call a pre-configured item determination script to obtain an item determination strategy;
[0091] The item determination unit is used to match the access information with the item determination strategy to determine whether the item to be accessed corresponding to the access information is the target item.
[0092] On this basis, the optional item determination unit can be used to:
[0093] The access information includes the to-be-accessed item information of the to-be-accessed item corresponding to the access information, and / or the occupancy status information of the to-be-accessed item on the service server, target item information of the pre-configured target item obtained based on the item determination strategy, and / or the target status information of the service server in the target state;
[0094] Whether the item to be accessed is the target item is determined based on the item to be accessed information and the target item information, and / or the occupancy status information and the target status information.
[0095] Optionally, the data reading module 520 may specifically include:
[0096] The strategy acquisition unit is used to call a pre-configured data reading script corresponding to the item details page where the target item is located, and obtain the data reading strategy of each business data in the item details page.
[0097] On this basis, optionally, the device may further include:
[0098] An operation acquisition module is used to acquire the data reading script to be adjusted and the adjustment operation corresponding to the adjustment trigger event when an adjustment trigger event of the adjustment script is detected;
[0099] The script updating module is used to adjust the data reading script to be adjusted based on the adjustment operation, and update the data reading script to be adjusted based on the adjustment result.
[0100] Optionally, the data reading module 520 may specifically include:
[0101] The data reading submodule is used to determine the data to be read in each business data based on each data reading strategy, and read the data to be read.
[0102] On this basis, the optional data reading submodule may specifically include:
[0103] The data reading unit is used to determine the data to be read in each business data and the reading channel of each data to be read based on each data reading strategy, and read the corresponding data to be read based on the reading channel.
[0104] On this basis, optionally, the data reading unit may specifically include:
[0105] A first data reading subunit is configured to read data from a cache server based on a data reading interface corresponding to the data to be read, using a reading channel including an interface reading interface; and / or
[0106] The second data reading subunit is configured to read data from a local reading channel, determine a cache location of the data to be read in the service server, and read the data to be read from the cache location.
[0107] On this basis, optionally, the second data reading subunit may specifically include:
[0108] The data cache sub-sub-unit is used to determine whether there is data to be read cached in the cache location. If not, it reads the data to be read from the cache server based on the data reading interface and caches the read data to be read in the cache location.
[0109] Optionally, the data reading module 520 may include:
[0110] A times determination unit, configured to determine whether the triggering times of the access triggering event exceeds a preset times threshold;
[0111] The information display unit is used to obtain the data reading strategy of each business data in the item details page where the target item is located if not, and otherwise send the preset identifier to the business client so that the business client displays the queue prompt information after receiving the preset identifier.
[0112] On the basis of the above device, optionally, the device may further include:
[0113] The information is sent to the module, which is used to obtain the information receiving method of the pre-configured alarm receiving object and send the alarm information to the alarm receiving object based on the information receiving method.
[0114] The page display device provided in the fifth embodiment of the present invention obtains access information corresponding to a monitored access trigger event for accessing a page through an item determination module, and can determine whether the item to be accessed corresponding to the access information is a target item. This allows the target item to be obtained from each item to be accessed that may cause a service server to crash. If the item to be accessed is a target item, the data reading module can obtain a data reading strategy for each business data item on the item details page where the target item is located, and read the corresponding business data based on each data reading strategy. This allows the business data that is important to the triggering user to be read in a manner that does not place excessive pressure on the service server and / or a cache server connected to the service server. Furthermore, the page display module sends the read business data to the service client, so that the service client displays the item details page based on the received business data. The above device completes the reading of the business data required to be read by obtaining the data reading strategy for each business data item on the item details page where the target item is located that may cause a service server to crash, thereby achieving the effect of effectively displaying the item details page, further achieving the effect of enhancing the user experience and increasing the effect of attracting new users.
[0115] The page display device provided in the embodiment of the present invention can execute the page display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0116] It is worth noting that in the embodiment of the above-mentioned page display device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0117] Example 6
[0118] Figure 10 A schematic diagram of the structure of a service server provided in Example 6 of the present invention, see Figure 10 The service server includes a memory 610, a processor 620, an input device 630, and an output device 640. The number of the processor 620 in the service server can be one or more. Figure 10 In the example, a processor 620 is used; the memory 610, the processor 620, the input device 630 and the output device 640 in the business server can be connected via a bus or other means. Figure 10 The connection via bus 650 is taken as an example.
[0119] Memory 610, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the page display method in the embodiments of the present invention (e.g., the item determination module 510, the data reading module 520, and the page display module 530 in the page display device). Processor 620 executes the software programs, instructions, and modules stored in memory 610 to execute various functional applications and data processing of the business server, thereby implementing the aforementioned page display method.
[0120] The memory 610 may primarily include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the business server, etc. Furthermore, the memory 610 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 610 may further include a memory remotely located relative to the processor 620, and these remote memories may be connected to the device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0121] The input device 630 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 640 may include a display device such as a display screen.
[0122] Example 7
[0123] A seventh embodiment of the present invention provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, the computer-executable instructions are used to perform a page display method. The method includes:
[0124] When an access trigger event of an access page is detected, access information corresponding to the access trigger event is obtained, and whether the item to be accessed corresponding to the access information is a target item;
[0125] If so, obtain the data reading strategy of each business data in the item details page where the target item is located, and read the corresponding business data based on each data reading strategy;
[0126] The read business data is sent to the business client, so that the business client displays the item details page according to the received business data.
[0127] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the operations of the method described above, and can also execute related operations in the page display method provided by any embodiment of the present invention.
[0128] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented with the help of software and necessary general-purpose hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a computer's floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0129] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A page display method, characterized in that: Applied to a business server, the method includes: When an access trigger event of an access page is detected, access information corresponding to the access trigger event is obtained, and whether the item to be accessed corresponding to the access information is a target item; wherein the target item is an item whose instantaneous number of visits or the query rate per second of the item details page where the target item is located exceeds a threshold that can be tolerated by the business server; If so, obtaining a data reading strategy for each business data item on the item details page where the target item is located, and reading the corresponding business data based on each data reading strategy; wherein the data reading strategy is used to determine whether to read the business data and the reading channel corresponding to the business data; the item details page includes multiple business data items, each of which has a corresponding data reading strategy; the data reading strategy corresponds to the importance of the business data item to the triggering user; The read business data are sent to the business client, so that the business client displays the item details page according to the received business data.
2. The method according to claim 1, characterized in that The determining whether the to-be-accessed item corresponding to the access information is a target item includes: Call the pre-configured item determination script to obtain the item determination strategy; The access information is matched with the item determination strategy to determine whether the to-be-accessed item corresponding to the access information is a target item.
3. The method according to claim 2, characterized in that The access information includes information of the to-be-accessed item corresponding to the access information and / or information on the occupancy status of the to-be-accessed item on the service server. Matching the access information with the item determination strategy to determine whether the to-be-accessed item corresponding to the access information is a target item includes: Acquiring target item information of a pre-configured target item and / or target state information of the service server in a target state based on the item determination strategy; It is determined whether the item to be accessed is the target item according to the information of the item to be accessed and the target item information, and / or the occupancy status information and the target status information.
4. The method according to claim 1, wherein The data reading strategy for obtaining each business data in the item details page where the target item is located includes: The pre-configured data reading script corresponding to the item details page where the target item is located is called to obtain the data reading strategy of each business data in the item details page.
5. The method according to claim 4, characterized in that Also includes: When an adjustment trigger event of the adjustment script is monitored, obtaining the data reading script to be adjusted and the adjustment operation corresponding to the adjustment trigger event; The data reading script to be adjusted is adjusted based on the adjustment operation, and the data reading script to be adjusted is updated based on the adjustment result.
6. The method according to claim 1, characterized in that The reading of the corresponding business data based on each of the data reading strategies includes: The data to be read in each of the business data is determined based on each of the data reading strategies, and the data to be read is read.
7. The method according to claim 6, characterized in that The determining the data to be read in each of the business data based on each of the data reading strategies, and reading the data to be read, includes: The data to be read in each of the business data and the reading channel of each of the data to be read are determined based on each of the data reading strategies, and the corresponding data to be read are read based on the reading channel.
8. The method according to claim 7, characterized in that The reading of the corresponding data to be read based on the reading channel includes: The reading channel includes interface reading, reading the data to be read from the cache server based on the data reading interface corresponding to the data to be read; and / or, The reading channel includes local reading, determining a cache location of the data to be read in the business server, and reading the data to be read from the cache location.
9. The method according to claim 8, characterized in that The reading the to-be-read data from the cache location includes: Determining whether the data to be read is cached in the cache location; If not, the to-be-read data is read from the cache server based on the data reading interface, and the read to-be-read data is cached in the cache location.
10. The method according to claim 1, characterized in that If so, a data reading strategy for each business data in the item details page where the target item is located is obtained, including: If so, determining whether the number of times the access triggering event is triggered exceeds a preset number threshold; If not, then obtain the data reading strategy of each business data in the item details page where the target item is located; otherwise, send the preset identifier to the business client, so that the business client displays the queuing prompt information after receiving the preset identifier.
11. The method according to claim 1, characterized in that After the above, it also includes: Acquire a pre-configured information receiving mode of an alarm receiving object, and send alarm information to the alarm receiving object based on the information receiving mode.
12. A page display device, characterized in that: Configured on a business server, the device includes: An item determination module is configured to, upon detecting an access trigger event for an access page, obtain access information corresponding to the access trigger event and determine whether the item to be accessed corresponding to the access information is a target item; wherein the target item is an item whose instantaneous number of visits or the query rate per second of the item details page where the target item is located exceeds a threshold that can be tolerated by the business server; a data reading module, configured to, if yes, obtain a data reading strategy for each piece of business data on the item details page where the target item is located, and read the corresponding business data based on each of the data reading strategies; wherein the data reading strategy is used to determine whether to read the business data and the reading channel corresponding to the business data; the item details page includes a plurality of business data, each piece of business data has a corresponding data reading strategy; the data reading strategy corresponds to the importance of the business data relative to the triggering user; The page display module is used to send the read business data to the business client, so that the business client displays the item details page according to the received business data.
13. A business server, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the page display method as described in any one of claims 1-11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the page display method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Page loading method and system and related equipment
CN106302557A
Page processing method, apparatus and system
CN106407341A
Automatic table splitting method based on mass data
CN110134677A
Commodity detail page linkage display method and system, electronic equipment and medium
CN111767494A