CN110673965A - Method and device for capturing second-killing commodities - Google Patents

Method and device for capturing second-killing commodities Download PDF

Info

Publication number
CN110673965A
CN110673965A CN201910860047.8A CN201910860047A CN110673965A CN 110673965 A CN110673965 A CN 110673965A CN 201910860047 A CN201910860047 A CN 201910860047A CN 110673965 A CN110673965 A CN 110673965A
Authority
CN
China
Prior art keywords
commodity
event
key
counter
browsing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910860047.8A
Other languages
Chinese (zh)
Inventor
王涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Huoxiaoer Technology Co Ltd
Original Assignee
Hangzhou Huoxiaoer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huoxiaoer Technology Co Ltd filed Critical Hangzhou Huoxiaoer Technology Co Ltd
Priority to CN201910860047.8A priority Critical patent/CN110673965A/en
Publication of CN110673965A publication Critical patent/CN110673965A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The application provides a method and a device for capturing second-killing commodities, wherein browsing events are stored in a message queue, then the browsing events are stored in a cache server after keys are generated, a counter in the cache server counts the browsing events, when the count value meets the condition, the commodities are accurately identified to be second-killing commodities, a large number of resources are not consumed by an e-commerce platform to count the number of times of visit per second QPS of each commodity, and the problems that in the related technology, the e-commerce platform consumes a large number of resources in the process of capturing second-killing commodities and is low in efficiency are solved.

Description

Method and device for capturing second-killing commodities
Technical Field
The application relates to the field of electronic commerce, in particular to a method and a device for capturing and killing commodities in seconds.
Background
In the related art, a large-scale and small-scale electronic commerce platform is endless, and the large-scale and small-scale electronic commerce platform faces a problem: on its platform, some goods may be purchased by thousands, even hundreds of millions, of consumers at a certain point in time due to a large price reduction or product scarcity, or other reasons. If the e-commerce platform is not specially designed for the second-killing goods, the processing capacity of the e-commerce platform always has an upper limit, and the transaction of other non-second-killing goods on the platform can be influenced.
Aiming at the problems that in the related art, the E-commerce platform consumes a large amount of resources in the process of capturing second killing commodities and is low in efficiency, no effective solution is available at present.
Disclosure of Invention
The embodiment of the application provides a method and a device for capturing second-killing commodities, and aims to at least solve the problems that in the related art, a large number of resources are consumed and the efficiency is low in the process of capturing second-killing commodities by an e-commerce platform.
According to an embodiment of the present application, there is provided a method of killing merchandise in seconds, including: detecting a browsing event of a first commodity, and storing the browsing event to a message queue; receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event; forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time; and under the condition that the counting value of the counter is detected to be larger than a threshold value, capturing the first commodity as a second-killing commodity.
There is also provided, in accordance with another embodiment of the present application, apparatus for capturing killers of merchandise, including: the detection module is used for detecting a browsing event of a first commodity and storing the browsing event to a message queue; an obtaining module, configured to receive an event stream sent by the message queue, and obtain a current time of a clock, where the event stream includes the browsing event; the storage module is used for forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time; and the identification module is used for capturing the first commodity as a second-killing commodity under the condition that the counting value of the counter is larger than a threshold value.
According to a further embodiment of the present application, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present application, there is also provided an electronic device, comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
According to the method and the device, a browsing event of the first commodity is detected, and the browsing event is stored in a message queue; receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event; forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time; and under the condition that the counting value of the counter is detected to be larger than a threshold value, capturing the first commodity as a second-killing commodity. By adopting the scheme, the browsing event is stored in the message queue, then the browsing event is stored in the cache server after the key is generated, the counting is carried out by the counter in the cache server, when the counting value meets the condition, the commodity is accurately identified as the second-killing commodity, the electricity merchant platform is not required to consume a large amount of resources to count the per-second access times QPS of each commodity, and the problems that the electricity merchant platform consumes a large amount of resources and is low in efficiency in the process of capturing the second-killing commodity in the related technology are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic view of an isolated secant killer according to a related art e-commerce platform;
fig. 2 is a block diagram of a hardware structure of a computer terminal of a method for capturing a second-killing commodity according to an embodiment of the present application;
FIG. 3 is a flow chart of capturing second kill merchandise according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a second kill scenario according to another embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The following is a brief description of technical terms used in this document:
Figure BDA0002199467180000031
Figure BDA0002199467180000041
in the related art, for the seckilling goods, there are various design schemes for isolating the seckilling goods, including physically or logically isolating the seckilling goods. Fig. 1 is a schematic diagram of a second-killing commodity isolation according to an e-commerce platform in the related art, and as shown in fig. 1, the commodity inspection and ordering flows are shunted through a Domain Name System (DNS for short) to perform physical isolation on Domain names, so that a purchase request of the second-killing commodity is sent to an independent computer cluster, and normal flow is sent to a normal commodity processing flow, so that normal transactions of non-second-killing commodities are not affected. And the inventory data of the second-killing commodities is physically transferred to an independent database, and the common commodity processing flow is transferred to the inventory mysql sub-table for hot spot transfer, so that the normal transaction of the non-second-killing commodities is not influenced. The related art isolation schemes may also include other schemes, but regardless of the isolation scheme, it is necessary to know in advance which commodities are likely to be killed second.
The scheme of sensing second killing goods in the related art may comprise the following modes:
the first scheme is as follows: and providing a system interface to allow the merchant to record the second killing commodity in advance.
This solution is very useful in large-scale network promotion scenes, but the disadvantages are also obvious: at ordinary times (non-promotion periods), some commodities are suddenly sold hot, such as through social media propagation, and the propagation opportunities are uncertain. The goods which are suddenly hot sold suddenly become second-killing goods, and the electric commerce platform system is undoubtedly a sudden earthquake.
Scheme II: the access details of a certain commodity are recorded, then the QPS is calculated at regular time, table 1 is a table of access times of commodities according to the related art, as shown in table 1:
TABLE 1
Commodity ID Time of access
1093836 2018-11-26 17:00:01
234567 2018-11-26 17:00:01
1093836 2018-11-26 17:00:01
1093836 2018-11-26 17:00:01
And then, performing count operation on the data by taking seconds as a unit to obtain the QPS. For example, according to the data in table 1, the QPS of the commodity with the commodity ID 1093836 is 3, and the QPS of the commodity with the commodity ID 234567 is 1.
Scheme two has the following disadvantages: if the access flow of the commodity is increased once in hundreds of millions of commodities, the real-time performance of the QPS operation on each commodity is greatly influenced in a short time. If the e-commerce platform cannot sense which commodities are probably killed in seconds in advance before 3 minutes (or less), the e-commerce platform is a disaster once the system capacity is insufficient.
Example one
The method provided by the first embodiment of the present application may be executed in a computer terminal or a similar computing device, and the computer terminal may be a server of an e-commerce platform. Taking a computer terminal as an example, fig. 2 is a hardware structure block diagram of a computer terminal of the method for capturing second-killing merchandise according to the embodiment of the present application, as shown in fig. 2, the computer terminal may include one or more processors 202 (only one is shown in fig. 2) (the processor 202 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), and a memory 204 for storing data, and optionally, the computer terminal may further include a transmission device 206 for communication function and an input/output device 208. It will be understood by those skilled in the art that the structure shown in fig. 2 is only an illustration, and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2.
The memory 204 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the method for capturing second-killing merchandise in the embodiment of the present application, and the processor 202 executes various functional applications and data processing by running the software programs and modules stored in the memory 204, so as to implement the method described above. Memory 204 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 204 may further include memory located remotely from the processor 202, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 206 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 206 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 206 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for capturing second-killing merchandise, which is executed in the above-mentioned computer terminal, is provided, fig. 3 is a flowchart of capturing second-killing merchandise according to an embodiment of the present application, and as shown in fig. 3, the flowchart includes the following steps:
step S302, detecting a browsing event of a first commodity, and storing the browsing event to a message queue;
step S304, receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event;
step S306, a first key is formed by the first commodity in the event stream and the current moment, the first key is stored in a cache server, and a counter corresponding to the first key is increased by one, wherein the counter is invalid after preset time;
step S308, under the condition that the counting value of the counter is larger than the threshold value, the first commodity is captured to be a second-killing commodity.
The method can be applied to a server of an e-commerce platform, and the server can be connected to a cache server.
Through the steps, a browsing event of the first commodity is detected through the method, and the browsing event is stored in the message queue; receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event; forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time; and under the condition that the counting value of the counter is detected to be larger than a threshold value, capturing the first commodity as a second-killing commodity. By adopting the scheme, the browsing event is stored in the message queue, then the browsing event is stored in the cache server after the key is generated, the counting is carried out by the counter in the cache server, when the counting value meets the condition, the commodity is accurately identified as the second-killing commodity, the electricity merchant platform is not required to consume a large amount of resources to count the per-second access times QPS of each commodity, and the problems that the electricity merchant platform consumes a large amount of resources and is low in efficiency in the process of capturing the second-killing commodity in the related technology are solved.
Optionally, the current time is a minimum time unit in minutes or seconds. When the minimum unit of the current time is minutes, a plurality of first keys can be generated according to a plurality of event streams of the current time, that is, each first key belongs to the current time, for example, keys composed of the 1 st second event stream and the 10 th second event stream of one minute are the same, and keys corresponding to the same counter, that is, keys corresponding to browsing events occurring in the same minute or two minutes are the same. The same applies to the case where the minimum unit at the present time is second, and the keys generated by the browsing events occurring in the same second are the same. The minimum unit of the current time is customizable, for example, 3 minutes is used as a minimum time unit.
Optionally, storing the browsing event to a message queue includes: and storing the browsing event to the message queue middleware MQ. With this scheme, even if e-commerce platforms are used for billions of commodities, more information processing can be supported as long as machines are added, due to the natural message stacking capability of MQ and the horizontal expansion capability.
Optionally, receiving the event stream sent by the message queue, and acquiring the current time of the clock includes: and receiving the event stream sent by the MQ, and acquiring the current time of the 24-hour clock. By adopting the scheme, different scales are configured for the event stream through the 24-hour clock, and the accuracy of time is ensured.
Optionally, the step of storing the first item in the event stream and the current time as a first key to a cache server includes: and forming a first key by the first commodity in the event stream and the current moment, and storing the first key to a cache server. The type of the first key may be a Redis key, and the cache server may be a Redis, or other cache servers, which are not limited herein. By adopting the scheme, a Redis cache invalidation mechanism is fully utilized, and the QPS of the commodity can be calculated in time, so that the effect of quick capture is achieved, and the capture is carried out in 1 minute at the fastest speed.
Optionally, when the clock is a 24-hour system clock, the preset time is the same as the minute scale interval of the 24-hour system clock.
Optionally, when it is detected that the count value of the counter is greater than a threshold, after the first commodity is captured as a second-killing commodity, a path for accessing the second-killing commodity is isolated by a network. By adopting the scheme, after the second-killing commodity is predicted, the access distance is isolated physically or logically in a network in time, and the normal access of other non-second-killing commodities is ensured.
The following description is made in conjunction with another embodiment of the present application.
As the above mentioned problem states, killing goods in seconds is as if it were an earthquake to the system of the e-commerce platform. It is good to have various isolation technologies in our related technologies (e.g., switching traffic through DNS, migrating through databases, etc., as mentioned above), which can limit the impact of "earthquake" to a certain extent, thereby not affecting the transactions of other goods on the e-commerce platform. The premise for implementing the isolation technologies is that a seismograph is required to find out a seismic source which is likely to generate an earthquake in advance, namely a second killing commodity.
Therefore, the patent provides a device for automatically capturing and killing commodities in seconds in the embodiment. By the device, the E-commerce platform can sense which commodities are probably killed in seconds in advance. Before the transaction of the commodities comes really, an isolation technology is implemented in advance to protect the transaction of other commodities on the platform from being influenced and improve the stability of the platform.
Fig. 4 is a schematic diagram of a scheme for capturing second killers according to another embodiment of the present application, and as shown in fig. 4, there is a 24-hour clock with 720 scales (of course, the number of scales can be adjusted, and if second killers are captured within 3 minutes, the number of scales is 24 × 60/3 — 480), and the minute hand of the clock moves once every 2 minutes.
And (3) commodity browsing MQ event stream: the viewing events for the goods are recorded to the MQ, such that when a certain goods is viewed by a consumer (user), a message is sent to the MQ. The MQ then in turn gives this message to the subscribers. The reason why the event of browsing the commodities is recorded is that a commodity may become a second-killing commodity, and the process that the commodity is browsed by a consumer first and then the consumer decides not to buy is necessarily experienced, and the commodity browsing is a main path of commodity transaction. The reason why the MQ is chosen to store the commodity browsing event first and then the MQ is sent to the subscriber (which is equivalent to the e-commerce platform in the above embodiment) for consumption is that when the number of commodities is large and the browsing times are large, the number of the commodity browsing events is huge, and the MQ provides strong buffering, peak clipping and horizontal expansion capabilities. Even if goods of hundreds of millions are browsed by users of hundreds of millions, the storage and consumption requirements of goods browsing events can be easily met only by adding machines.
When the commodity browsing MQ event stream arrives, a rediskey is calculated by combining the value of the current minute hand of the 24-hour system clock, as shown in fig. 4, the scale pointed by the minute hand is 2018102602 (format: year, month and day), the commodity ID in the commodity browsing event is 123456 (namely, the commodity ID123456 is browsed), and the key is 2018102602123456.
Then judging that the key does not exist in Redis, if the key does not exist, setting the value (an integer counter) corresponding to the key to be 1, and automatically disabling after setting for 2 minutes. The expiration time is not fixed, and can be set by a user, for example, how many minutes the scale of the 24-hour clock is, and how long the expiration time is.
If this key exists, its corresponding value (an integer counter) is incremented by 1.
And then judging whether the value of the counter exceeds a warning QPS, if so, successfully capturing the second-killing commodity, and at the moment, implementing various isolation technologies on the commodity in advance by the E-commerce platform. Isolation techniques are briefly described above, and isolation techniques are not the focus of this patent and detailed technical details of isolation techniques are not expanded herein.
In the scheme, Redis Cluster can be selected for caching, so that the bottleneck that the counter is stored and 1 adding operation is completed when a single Redis meets massive commodities is avoided. After Redisccluster is adopted, the storage capacity of the counter can be improved through horizontal expansion, and the operational capacity of 1 is added.
By adopting the scheme, the message stacking capability and the horizontal expansion capability based on the natural MQ are realized, namely billion-level commodities can be supported as long as a machine is added. Different scales are configured by a 24-hour clock, and a Redis cache invalidation mechanism is adopted, so that the QPS of the commodity can be calculated in time, the effect of quick capture is achieved, and the capture is performed in 1 minute at the fastest speed.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
Example two
In this embodiment, a device for capturing second-killing merchandise is further provided, and the device is used to implement the above embodiments and preferred embodiments, which have already been described and will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
There is also provided, in accordance with another embodiment of the present application, apparatus for capturing killers of merchandise, including:
the detection module is used for detecting a browsing event of a first commodity and storing the browsing event to a message queue;
an obtaining module, configured to receive an event stream sent by the message queue, and obtain a current time of a clock, where the event stream includes the browsing event;
the storage module is used for forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time;
and the identification module is used for capturing the first commodity as a second-killing commodity under the condition that the counting value of the counter is larger than a threshold value.
According to the method and the device, a browsing event of the first commodity is detected, and the browsing event is stored in a message queue; receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event; forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time; and under the condition that the counting value of the counter is detected to be larger than a threshold value, capturing the first commodity as a second-killing commodity. By adopting the scheme, the browsing event is stored in the message queue, then the browsing event is stored in the cache server after the key is generated, the counting is carried out by the counter in the cache server, when the counting value meets the condition, the commodity is accurately identified as the second-killing commodity, the electricity merchant platform is not required to consume a large amount of resources to count the per-second access times QPS of each commodity, and the problems that the electricity merchant platform consumes a large amount of resources and is low in efficiency in the process of capturing the second-killing commodity in the related technology are solved.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
EXAMPLE III
Embodiments of the present application also provide a storage medium. Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, detecting a browsing event of the first commodity, and storing the browsing event to a message queue;
s2, receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event;
s3, forming a first key by the first commodity in the event stream and the current time, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time;
and S4, capturing the first commodity as a second-killing commodity under the condition that the counting value of the counter is greater than the threshold value.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, which can store program codes.
Embodiments of the present application further provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, detecting a browsing event of the first commodity, and storing the browsing event to a message queue;
s2, receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event;
s3, forming a first key by the first commodity in the event stream and the current time, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time;
and S4, capturing the first commodity as a second-killing commodity under the condition that the counting value of the counter is greater than the threshold value.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of capturing a second kill commodity, comprising:
detecting a browsing event of a first commodity, and storing the browsing event to a message queue;
receiving an event stream sent by the message queue, and acquiring the current time of a clock, wherein the event stream comprises the browsing event;
forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time;
and under the condition that the counting value of the counter is detected to be larger than a threshold value, capturing the first commodity as a second-killing commodity.
2. The method of claim 1, wherein the current time is in minutes or seconds as a minimum time unit.
3. The method of claim 1, wherein storing the browsing event to a message queue comprises:
and storing the browsing event to the message queue middleware MQ.
4. The method of claim 3, wherein receiving the event stream sent by the message queue and obtaining the current time of the clock comprises:
and receiving the event stream sent by the MQ, and acquiring the current time of the 24-hour clock.
5. The method of claim 1, wherein storing the first item in the event stream and the current time as a first key to a cache server comprises:
and forming a first key by the first commodity in the event stream and the current moment, and storing the first key to a cache server.
6. The method of claim 1, wherein the predetermined time is the same as a minute scale interval of a 24-hour system clock when the clock is a 24-hour system clock.
7. The method of claim 1, wherein upon detecting that the count value of the counter is greater than a threshold value, after capturing the first item as a second kill item, the method further comprises:
and carrying out network isolation on the path for accessing the killing-second commodity.
8. A device for capturing second kill merchandise, comprising:
the detection module is used for detecting a browsing event of a first commodity and storing the browsing event to a message queue;
an obtaining module, configured to receive an event stream sent by the message queue, and obtain a current time of a clock, where the event stream includes the browsing event;
the storage module is used for forming a first key by the first commodity in the event stream and the current moment, storing the first key to a cache server, and adding one to a counter corresponding to the first key, wherein the counter is invalid after preset time;
and the identification module is used for capturing the first commodity as a second-killing commodity under the condition that the counting value of the counter is larger than a threshold value.
9. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN201910860047.8A 2019-09-11 2019-09-11 Method and device for capturing second-killing commodities Pending CN110673965A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910860047.8A CN110673965A (en) 2019-09-11 2019-09-11 Method and device for capturing second-killing commodities

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910860047.8A CN110673965A (en) 2019-09-11 2019-09-11 Method and device for capturing second-killing commodities

Publications (1)

Publication Number Publication Date
CN110673965A true CN110673965A (en) 2020-01-10

Family

ID=69077764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910860047.8A Pending CN110673965A (en) 2019-09-11 2019-09-11 Method and device for capturing second-killing commodities

Country Status (1)

Country Link
CN (1) CN110673965A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464621A (en) * 2020-03-30 2020-07-28 四川新网银行股份有限公司 Method for detecting message sending and receiving quantity in asynchronous communication of distributed system
CN111506445A (en) * 2020-04-21 2020-08-07 北京思特奇信息技术股份有限公司 Method and system for preventing repeated malicious ordering of commodities based on REDIS cache

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446171A (en) * 2016-09-26 2017-02-22 天脉聚源(北京)科技有限公司 Method and device for generating statistics indexes
CN107220878A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 Transaction processing system, second kill order processing method and apparatus
CN107360222A (en) * 2017-06-30 2017-11-17 广东欧珀移动通信有限公司 Merchandise news method for pushing, device, storage medium and server
CN108022153A (en) * 2017-12-04 2018-05-11 深圳春沐源控股有限公司 The display methods and display system of goods browse record
CN108229996A (en) * 2016-12-21 2018-06-29 天脉聚源(北京)科技有限公司 Promote the method and system of the second activity of killing in a kind of internet store
CN110011895A (en) * 2018-01-04 2019-07-12 阿里巴巴集团控股有限公司 Session method, method, the equipment for obtaining the associated link information of object

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446171A (en) * 2016-09-26 2017-02-22 天脉聚源(北京)科技有限公司 Method and device for generating statistics indexes
CN108229996A (en) * 2016-12-21 2018-06-29 天脉聚源(北京)科技有限公司 Promote the method and system of the second activity of killing in a kind of internet store
CN107220878A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 Transaction processing system, second kill order processing method and apparatus
CN107360222A (en) * 2017-06-30 2017-11-17 广东欧珀移动通信有限公司 Merchandise news method for pushing, device, storage medium and server
CN108022153A (en) * 2017-12-04 2018-05-11 深圳春沐源控股有限公司 The display methods and display system of goods browse record
CN110011895A (en) * 2018-01-04 2019-07-12 阿里巴巴集团控股有限公司 Session method, method, the equipment for obtaining the associated link information of object

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464621A (en) * 2020-03-30 2020-07-28 四川新网银行股份有限公司 Method for detecting message sending and receiving quantity in asynchronous communication of distributed system
CN111464621B (en) * 2020-03-30 2022-06-24 四川新网银行股份有限公司 Method for detecting message sending and receiving quantity in asynchronous communication of distributed system
CN111506445A (en) * 2020-04-21 2020-08-07 北京思特奇信息技术股份有限公司 Method and system for preventing repeated malicious ordering of commodities based on REDIS cache

Similar Documents

Publication Publication Date Title
US10805328B2 (en) Systems and methods for detecting and scoring anomalies
CN104426713B (en) The monitoring method and device of web site access effect data
CN107992356A (en) Block chain affairs block processes method, electronic device and readable storage medium storing program for executing
CN112311612B (en) Information construction method and device and storage medium
CN108880934B (en) Data flow statistical method and device based on block chain
CN109039817B (en) Information processing method, device, equipment and medium for flow monitoring
CN110322209A (en) Comment information processing method, device, system and storage medium
CN110673965A (en) Method and device for capturing second-killing commodities
CN110300084A (en) A kind of IP address-based portrait method and apparatus
CN104427519A (en) Method and device for managing attributions of IP (Internet Protocol) addresses
CN104468399A (en) Data transmission method and device and server
CN112738252A (en) E-commerce high-concurrency second-killing system
Reznichenko et al. Private-by-design advertising meets the real world
CN112150203A (en) Real estate client visit identification method and device, electronic equipment and storage medium
TWI786331B (en) Shopping mall management system, shopping mall management method, computing device, and non-transitory machine-readable storage medium
US20240022507A1 (en) Information flow recognition method, network chip, and network device
CN110851758A (en) Webpage visitor number statistical method and device
CN105577462A (en) Mobile device flow statistical method and device
WO2020020358A1 (en) Method and apparatus for determining residence time duration, device, and storage medium
CN110266746A (en) A kind of information-pushing method, apparatus and system
JP5581501B2 (en) Information processing system, information processing apparatus, community mediation method, and program
CN107548027B (en) Data pushing method, device and equipment and computer storage medium
US20130159051A1 (en) System and Method for Enhanced Information Gathering
CN115545735A (en) Method and device for sending coupon, storage medium and electronic device
CN115811544A (en) Unitized monitoring method, system, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200110

RJ01 Rejection of invention patent application after publication