CN112584186B - Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service - Google Patents

Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service Download PDF

Info

Publication number
CN112584186B
CN112584186B CN202011372306.1A CN202011372306A CN112584186B CN 112584186 B CN112584186 B CN 112584186B CN 202011372306 A CN202011372306 A CN 202011372306A CN 112584186 B CN112584186 B CN 112584186B
Authority
CN
China
Prior art keywords
live broadcast
shopping cart
data
product
cart service
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.)
Active
Application number
CN202011372306.1A
Other languages
Chinese (zh)
Other versions
CN112584186A (en
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.)
Weimeng Chuangke Network Technology China Co Ltd
Original Assignee
Weimeng Chuangke Network Technology China 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 Weimeng Chuangke Network Technology China Co Ltd filed Critical Weimeng Chuangke Network Technology China Co Ltd
Priority to CN202011372306.1A priority Critical patent/CN112584186B/en
Publication of CN112584186A publication Critical patent/CN112584186A/en
Application granted granted Critical
Publication of CN112584186B publication Critical patent/CN112584186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • H04N21/2542Management at additional data server, e.g. shopping server, rights management server for selling goods, e.g. TV shopping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/466Learning process for intelligent management, e.g. learning user preferences for recommending movies
    • H04N21/4668Learning process for intelligent management, e.g. learning user preferences for recommending movies for recommending content, e.g. movies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/47815Electronic shopping

Abstract

The embodiment of the invention provides a live broadcast method and a live broadcast system based on establishment of live broadcast shopping cart service of an E-commerce, wherein a live broadcast end is provided with a live broadcast room and shopping cart service of live broadcast products related to the live broadcast room; the live broadcast method comprises the following steps: shunting user requests from a gateway, directly pushing the user requests for watching a live broadcasting room to the live broadcasting room, and directly pushing the user requests for shopping cart service related to live broadcasting products to the shopping cart service; according to a user request of shopping cart service related to live broadcast products, acquiring related live broadcast product data from a local cache of the shopping cart service; and the local cache of the shopping cart service acquires the product updating data from a preset second-level cache and updates the product updating data instantly, and the time effectiveness of the local cache of the shopping cart service is smaller than that of the second-level cache. The local cache and the distributed secondary cache are adopted to jointly meet the data updating support of the shopping cart service, and meanwhile, the problem of inconsistent data source breakdown and data updating is avoided.

Description

Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service
Technical Field
The invention relates to the field of E-commerce live broadcast platforms, in particular to a live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service.
Background
With the rapid rise of internet live broadcast tape goods, in order to ensure the experience of users and anchor in large-flow anchor tape goods, the stability and usability of the server are essential, so that the server must be required to ensure high availability and high reliability under the impact of large flow.
In the process of implementing the invention, the applicant finds that at least the following problems exist in the prior art: in the prior art, data consistency is ensured by actively accessing a downstream data update cache through automatic invalidation of the cache. Therefore, live e-commerce cannot stably provide services in large-flow live broadcast, and meanwhile, the data of the live e-commerce department is inconsistent within 15s, so that the user experience is influenced.
Disclosure of Invention
The embodiment of the invention provides a live broadcast method and a live broadcast system based on establishment of E-commerce live broadcast shopping cart service, which adopt a local cache and a secondary cache to jointly meet the update support of data of the shopping cart service, simultaneously avoid the problem of inconsistent breakdown of a data source (a live broadcast product supplier) and data update, and simultaneously ensure the real-time performance of the data source and the data update.
In order to achieve the above object, in one aspect, an embodiment of the present invention provides a live broadcast method based on establishment of an e-commerce live broadcast shopping cart service, in which a live broadcast end is provided with a live broadcast room and a shopping cart service of live broadcast products related to the live broadcast room; the live broadcast method based on the constructed E-commerce live broadcast shopping cart service comprises the following steps:
shunting user requests from a gateway, directly pushing the user requests for watching the live broadcasting room to the live broadcasting room, and directly pushing the user requests for shopping cart service related to live broadcasting products to the shopping cart service;
according to a user request of shopping cart service related to live broadcast products, acquiring related live broadcast product data from a local cache of the shopping cart service; the local cache of the shopping cart service acquires product updating data from a preset second-level cache and updates the product updating data instantly, and the time effectiveness of the local cache of the shopping cart service is smaller than that of the second-level cache.
On the other hand, the embodiment of the invention provides a live broadcast system based on the establishment of live broadcast shopping cart service of E-commerce, the live broadcast system is provided with a live broadcast room and shopping cart service of live broadcast products related to the live broadcast room, and the shopping cart service comprises a shopping cart service unit, a local cache and a second-level cache; the live broadcast system based on the service of constructing the E-commerce live broadcast shopping cart comprises:
the request distribution unit is used for distributing the user request from the gateway, directly pushing the user request for watching the live broadcasting room to the live broadcasting room and directly pushing the user request for shopping cart service related to live broadcasting products to the shopping cart service unit;
the shopping cart service unit is used for acquiring related live broadcast product data from a local cache of the shopping cart service according to a user request of the shopping cart service related to the live broadcast product;
and the local cache of the shopping cart service acquires the product updating data from a preset second-level cache and updates the product updating data instantly, wherein the timeliness of the local cache is smaller than that of the second-level cache.
The technical scheme has the following beneficial effects: the local cache and the secondary cache are adopted to jointly meet the data updating support of the shopping cart service, the problem that a data source (a live broadcast product supplier) is broken down and inconsistent with data updating is solved, and the real-time performance of the data source and the data updating is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a live method based on building an E-commerce live shopping cart service according to an embodiment of the present invention;
FIG. 2 is a block diagram of a live broadcast system based on the construction of an E-commerce live broadcast shopping cart service according to an embodiment of the present invention;
FIG. 3 is a prior art live E-commerce flow diagram;
FIG. 4 is a block diagram of a live system of an embodiment of the present invention;
FIG. 5 is a flow chart of a live method of an application example of the present invention;
FIG. 6 is a data flow diagram of an anchor read request of the present invention;
FIG. 7 is a data flow diagram of an anchor write request of the present invention;
FIG. 8 is a data update flow of the shopping cart service of the present invention;
FIG. 9 is a flow of the present invention for processing update data of a supplier using an asynchronous queue;
FIG. 10 is a data update flow of the shopping cart service of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
As shown in fig. 1, in combination with the embodiment of the present invention, a live broadcast method based on building live broadcast shopping cart service for e-commerce is provided, where a live broadcast end of live broadcast shopping for e-commerce is provided with a live broadcast room and shopping cart service of live broadcast products related to the live broadcast room; the live broadcast method based on the constructed E-commerce live broadcast shopping cart service comprises the following steps:
s101: shunting user requests from a gateway, directly pushing the user requests for watching a live broadcasting room to the live broadcasting room, and directly pushing the user requests for shopping cart service related to live broadcasting products to the shopping cart service;
s102: according to a user request of shopping cart service related to live broadcast products, acquiring related live broadcast product data from a local cache of the shopping cart service; and the local cache of the shopping cart service acquires the product updating data from a preset second-level cache and updates the product updating data instantly, and the time effectiveness of the local cache of the shopping cart service is smaller than that of the second-level cache.
Preferably, the method further comprises the following steps:
s103: the shopping cart service periodically inquires and acquires product updating data from a preset interface provided by a live broadcast product supplier, and updates the acquired product updating data to a second-level cache;
in step 102, the local cache of the shopping cart service obtains the product update data from a preset second-level cache and updates the product update data in real time, which specifically includes:
s1021: and after the local cache fails, acquiring the product updating data from the second-level cache to update the live broadcast product data, and/or periodically acquiring the product updating data from the second-level cache to update the live broadcast product data.
Preferably, in step 1021, the shopping cart service periodically queries and obtains product update data from a preset interface provided by a live product supplier, and updates the obtained product update data to the second-level cache, specifically including:
the shopping cart service acquires a message carrying product updating data from the asynchronous message queue, and stores the product updating data in the message into a second-level cache of the shopping cart service respectively; the asynchronous message queue is a distributed publish-subscribe message system kafka, and the live broadcast product supplier packages the product update data into a message and sends the message to the asynchronous message queue, wherein the message carrying the product update data is the message carried by the live broadcast product supplier.
Preferably, the method further comprises the following steps:
s104: and a local cache and an expandable redis distributed cache are arranged in the live broadcast room, and the data generated during live broadcast are jointly stored through the local cache and the expandable redis distributed cache in the live broadcast room.
Preferably, the method further comprises the following steps:
s105: and monitoring the data concurrency of the shopping cart service in real time, and expanding a second-level cache when the data concurrency exceeds the preset processing capacity, wherein the second-level cache is a redis distributed cache.
As shown in fig. 2, in combination with the embodiment of the present invention, there is provided a live broadcast system based on a live broadcast shopping cart service of a building e-commerce, which is characterized in that the live broadcast system is provided with a live broadcast room and a shopping cart service of live broadcast products related to the live broadcast room, and the shopping cart service includes a shopping cart service unit 22, a local cache and a second-level cache; the live broadcast system based on the constructed E-commerce live broadcast shopping cart service comprises:
the request distribution unit 21 is used for distributing the user request from the gateway, directly pushing the user request for watching the live broadcasting room to the live broadcasting room, and directly pushing the user request for shopping cart service related to live broadcasting products to the shopping cart service unit;
the shopping cart service unit 22 is used for acquiring related live broadcast product data from a local cache of the shopping cart service according to a user request of the shopping cart service related to the live broadcast product;
and the local cache of the shopping cart service acquires the product updating data from a preset second-level cache and updates the product updating data instantly, wherein the timeliness of the local cache is smaller than that of the second-level cache.
Preferably, the shopping cart service further comprises a raw data updating unit 23, wherein:
the original data updating unit 23 is configured to periodically query and acquire product updating data from a preset interface provided by a live broadcast product supplier, and update the acquired product updating data to the second-level cache;
the local cache of the shopping cart service is also used for acquiring the product updating data from the second-level cache to update the live broadcasting product data after the local cache is invalid, and/or periodically acquiring the product updating data from the second-level cache to update the live broadcasting product data.
Preferably, the original data updating unit 23 is specifically configured to:
obtaining a message carrying product updating data from the asynchronous message queue, and respectively storing the product updating data in the message into a second-level cache; the asynchronous message queue is a distributed publish-subscribe message system kafka, and the live broadcast product supplier packages the product update data into a message and sends the message to the asynchronous message queue, wherein the message carrying the product update data is the message carried by the live broadcast product supplier.
Preferably, a local cache and an expandable redis distributed cache are arranged in the live broadcast room, and data generated during live broadcast are jointly stored through the local cache of the live broadcast room and the expandable redis distributed cache.
Preferably, the shopping cart service further comprises:
and the monitoring unit 24 is configured to monitor data concurrency of the shopping cart service in real time, and when the data concurrency exceeds a preset processing capacity, expand the second-level cache, where the second-level cache is a redis distributed cache.
The beneficial effects obtained by the invention are as follows:
the local cache and the distributed secondary cache are adopted to jointly meet the data updating support of the shopping cart service, the problem that a data source (live broadcast product supplier) is broken down and the data updating is inconsistent is avoided, the real-time performance of the data source and the data updating is guaranteed, and the secondary cache has the transverse capacity expansion and reduction capacity.
Compared with the E-business framework in the current Internet, the system has a high availability and high stability framework, the shopping cart service actively accesses the data source (periodically inquires and obtains product updating data from a preset interface provided by a live broadcast product supplier) in a short time, refreshes a local memory and a distributed cache (a second-level cache), and combines the active notification modification and automatic invalidation bottom-digging mechanism of the data source supplier, so that the large-flow live broadcast is ensured not to break down the data source, the data consistency is ensured, and the transverse expansion and contraction capacity can be supported.
The above technical solutions of the embodiments of the present invention are described in detail below with reference to specific application examples, and reference may be made to the foregoing related descriptions for technical details that are not described in the implementation process.
In the prior art, as shown in fig. 3, a live broadcast list and details of a commodity are all stored in an e-commerce department, and a live broadcast department (a background) is responsible for direct interactive operation with a main broadcast and a user, high performance and high availability are required to be ensured, otherwise, experience influence of the main broadcast and the user on revenue is reduced, and as basic data are all provided by the e-commerce department and an interface of the basic data cannot bear large-flow impact (the highest guarantee is 100 qps), the e-commerce live broadcast platform needs a guarantee design with high performance, high availability and data consistency. The summary is as follows:
1) The live E-commerce system comprises a central control system, a marketing system and a live inventory, wherein commodity data in the live inventory of the E-commerce system are stored in the E-commerce system.
2) Live E-commerce is responsible for capacity and commodity data consistency.
3) E-commerce live broadcast commodity data consistency relies on E-commerce notifications.
Compared with the prior art, the method is designed for the high performance of the E-commerce live broadcast shopping cart, and a local cache and second-level cache (distributed cache) automatic refreshing mechanism and department asynchronous notification (asynchronous message queue) of shopping cart service are accessed according to the characteristics of the current E-commerce live broadcast technical architecture and cross-department interaction, so that the data consistency and the usability in the shopping cart are guaranteed.
The whole architecture of the invention is shown in fig. 4, the whole flow is shown in fig. 5, and live e-commerce live broadcast specifically comprises live broadcast related parts and live broadcast commodity shopping cart service. All request flow related to live telecast of the E-commerce comes to the gateway first, after passing through the gateway, a part of the request flow is sent to live telecast shopping cart service (user requests of shopping cart service related to live broadcast products are directly pushed to shopping cart service), and the other part of the request flow is sent to live telecast related parts (user requests of watching live broadcast rooms are directly pushed to live broadcast rooms). Wherein the live related parts include: live core services, integrated services, and interactivity aspects; live core services include, for example: switching on and off live broadcasting, and watching live broadcasting service; the integrated service includes activity aspects, such as leaderboards; the invention is characterized in that live E-commerce service, namely service related to commodities in a shopping cart. Wherein the services related to the items in the shopping cart include:
1. live basic service: broadcasting, closing and broadcasting information in a live room;
2. e-business-small store: the method refers to a main source party of direct-broadcast commodities, and integrates commodities of all (on-line) suppliers;
3. the user center: information containing users, such as user nicknames and the like;
im (instant messaging system): for example, sending commodity to set up and explaining message, and the mobile phone client can do corresponding operation instantly after receiving the message.
The core design for a goods related service in a shopping cart (i.e., a shopping cart service) is:
1) Capacity expansion, capacity read by a user side (user), and capacity written by a main broadcasting side (main broadcasting core service and integrated service);
2) For live product downstream capacity protection, downstream e-commerce (live product supplier) modules may not resist volume;
3) The consistency and timeliness of the updated data are guaranteed.
1. Capacity expansion design
As shown in fig. 6 and 7, according to a user request of a shopping cart service related to live broadcast products, relevant live broadcast product data is obtained from a local cache of the shopping cart service; and the local cache of the shopping cart service acquires the product updating data from a preset second-level cache and updates the product updating data instantly, and the time effectiveness of the local cache of the shopping cart service is smaller than that of the second-level cache. That is, the reading capacity of the user side is guaranteed by a local cache and a second-level cache (redis distributed cache) of the shopping cart, and downstream e-commerce department services cannot be directly punctured in the e-commerce live broadcast process. The second-level cache is a redis distributed cache, monitors the data concurrency amount of the shopping cart service in real time, and expands the second-level cache when the data concurrency amount exceeds the preset processing capacity.
The write capacity of the anchor end depends on the maximum qps (request per second) that the e-commerce live broadcast room can bear, specifically: and a local cache and an expandable redis distributed cache are arranged in the live broadcast room, and the data generated during live broadcast are jointly stored through the local cache and the expandable redis distributed cache in the live broadcast room.
2. Design of data consistency & timeliness, as shown in FIG. 8, FIG. 9, FIG. 10
The data consistency is ensured by combining [ notification update ] + [ cache invalidation ]; namely: the shopping cart service periodically inquires and acquires product updating data from a preset interface provided by a live broadcast product supplier, and updates the acquired product updating data to a second-level cache; and after the local cache fails, the product updating data is obtained from the second-level cache to update the live broadcast product data, and/or the local cache periodically obtains the product updating data from the second-level cache to update the live broadcast product data.
1) The E-business (live broadcast product supplier) sends a message to a distributed publishing and subscribing message system kafka when the data is updated, the E-business live broadcast realizes the data updating through consuming the message, the data updating is processed asynchronously, and the updating timeliness is 3s for example; the shopping cart service acquires a message carrying product updating data from the asynchronous message queue, and stores the product updating data in the message into a second-level cache of the shopping cart service respectively; the asynchronous message queue is a distributed publish-subscribe message system kafka, and the live broadcast product supplier packages the product update data into a message and sends the message to the asynchronous message queue, wherein the message carrying the product update data is the message carried by the live broadcast product supplier.
2) And (4) cache invalidation, namely updating when a local cache is invalidated, wherein the second-level cache is used as a bottom-storing mechanism, and the timeliness of the bottom-storing mechanism is 30s. I.e., the local cache of the shopping cart service has a smaller age than the second level cache.
3. Technical support objective
1) Mainly reading the reactance amount of a Redis distributed cache;
2) The simple writing service is guaranteed through two aspects, namely, the Mysql database is optimized; secondly, the quality requirement of the shopping cart service is determined and monitored; three complex write services, handled through asynchronous message queues;
3) In a system performance monitoring scene, when the concurrency exceeds the preset processing capacity, the service RT TP99 monitors that the redis distributed cache is expanded, so that the potential performance hazard can be found and solved in time. The application program interface API TP99<200ms.
The beneficial effects obtained by the invention are as follows:
the local cache and the distributed secondary cache are adopted to jointly meet the data updating support of the shopping cart service, the problem that a data source (live broadcast product supplier) is broken down and the data updating is inconsistent is avoided, the real-time performance of the data source and the data updating is guaranteed, and the secondary cache has the transverse capacity expansion and reduction capacity.
Compared with the E-business framework in the internet at present, the system has a high availability and high stability framework, shopping cart service actively accesses a data source (periodically inquires and obtains product updating data from a preset interface provided by a live broadcast product supplier) in a short time, refreshes a local memory and a distributed cache (second-level cache), and actively informs a modification and automatic invalidation bottom-holding mechanism in combination with the data source supplier, so that the large-flow live broadcast is ensured not to break down the data source, the data consistency is ensured, and the transverse expansion and contraction capacity can be supported.
It should be understood that the specific order or hierarchy of steps in the processes disclosed is an example of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not intended to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, invention lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. To those skilled in the art; various modifications to these embodiments will be readily apparent, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
What has been described above includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent that the term "includes" is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term "comprising" as "comprising" is interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or".
Those of skill in the art will also appreciate that the various illustrative logical blocks, elements, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Those skilled in the art may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the invention.
The various illustrative logical blocks, or elements, described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but, in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described in the embodiments of the present invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can comprise, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program code in the form of instructions or data structures and that can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. In addition, any connection is properly termed a computer-readable medium, and thus is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks, where magnetic discs generally reproduce data magnetically, while disks generally reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A live broadcast method based on establishment of E-commerce live broadcast shopping cart service is characterized in that a live broadcast end is provided with a live broadcast room and shopping cart service of live broadcast products related to the live broadcast room; the live broadcast method based on the constructed E-commerce live broadcast shopping cart service comprises the following steps:
shunting user requests from a gateway, directly pushing the user requests for watching a live broadcasting room to the live broadcasting room, and directly pushing the user requests for shopping cart service related to live broadcasting products to the shopping cart service;
according to a user request of shopping cart service related to live broadcast products, acquiring related live broadcast product data from a local cache of the shopping cart service; the local cache of the shopping cart service acquires product updating data from a preset second-level cache and updates the product updating data instantly, and the time effectiveness of the local cache of the shopping cart service is smaller than that of the second-level cache;
the live broadcast method based on the establishment of E-commerce live broadcast shopping cart service further comprises the following steps:
the shopping cart service periodically inquires and acquires product updating data from a preset interface provided by a live broadcast product supplier, and updates the acquired product updating data to a second-level cache;
the local cache of the shopping cart service acquires product updating data from a preset second-level cache and updates the product updating data instantly, and specifically comprises the following steps:
and after the local cache fails, acquiring the product updating data from the second-level cache to update the live product data, and/or periodically acquiring the product updating data from the second-level cache to update the live product data by the local cache.
2. The live broadcast method based on live broadcast shopping cart service construction of the e-commerce according to claim 1, wherein the shopping cart service periodically queries and obtains product update data from a preset interface provided by a live broadcast product supplier, and updates the obtained product update data to the second-level cache, specifically comprising:
the shopping cart service acquires a message carrying product updating data from the asynchronous message queue, and stores the product updating data in the message into a second-level cache of the shopping cart service respectively; the asynchronous message queue is a distributed publish-subscribe message system kafka, and the live broadcast product supplier packages the product update data into a message and sends the message to the asynchronous message queue, wherein the message carrying the product update data is the message carried by the live broadcast product supplier.
3. The live broadcast method based on the constructed E-commerce live broadcast shopping cart service as claimed in claim 1, further comprising:
and a local cache and an expandable redis distributed cache are arranged in the live broadcast room, and the data generated during live broadcast are jointly stored through the local cache and the expandable redis distributed cache in the live broadcast room.
4. The live broadcast method based on the build e-commerce live broadcast shopping cart service of claim 1, further comprising: and monitoring the data concurrency of the shopping cart service in real time, and expanding a second-level cache when the data concurrency exceeds the preset processing capacity, wherein the second-level cache is a redis distributed cache.
5. A live broadcast system based on building E-commerce live broadcast shopping cart service is characterized in that the live broadcast system is provided with a live broadcast room and shopping cart service of live broadcast products related to the live broadcast room, and the shopping cart service comprises a shopping cart service unit, a local cache and a second-level cache; the live broadcast system based on the service of constructing the E-commerce live broadcast shopping cart comprises:
the request distribution unit is used for distributing user requests from the gateway, directly pushing the user requests for watching the live broadcasting room to the live broadcasting room and directly pushing the user requests for shopping cart service related to live broadcasting products to the shopping cart service unit;
the shopping cart service unit is used for acquiring related live broadcast product data from a local cache of the shopping cart service according to a user request of the shopping cart service related to the live broadcast product;
the local cache of the shopping cart service acquires product updating data from a preset second-level cache and updates the product updating data instantly, wherein the timeliness of the local cache is smaller than that of the second-level cache;
the shopping cart service further includes a raw data update unit, wherein:
the original data updating unit is used for periodically inquiring and acquiring product updating data from a preset interface provided by a live broadcast product supplier and updating the acquired product updating data to a second-level cache;
the local cache of the shopping cart service is also used for acquiring the product updating data from the second-level cache to update the live broadcasting product data after the local cache is invalid, and/or periodically acquiring the product updating data from the second-level cache to update the live broadcasting product data.
6. The live broadcast system for building the E-commerce live broadcast shopping cart service according to claim 5, wherein the raw data updating unit is specifically configured to:
obtaining a message carrying product updating data from the asynchronous message queue, and respectively storing the product updating data in the message into a second-level cache; the asynchronous message queue is a distributed publish-subscribe message system kafka, and the live broadcast product supplier packages the product update data into a message and sends the message to the asynchronous message queue, wherein the message carrying the product update data is the message carried by the live broadcast product supplier.
7. The live broadcasting system based on the built E-commerce live broadcast shopping cart service as claimed in claim 5, wherein a local cache and an extensible redis distributed cache are arranged in the live broadcasting room, and data generated during live broadcasting are jointly stored through the local cache and the extensible redis distributed cache of the live broadcasting room.
8. The live system based on the build e-commerce live shopping cart service of claim 5, wherein the shopping cart service further comprises:
and the monitoring unit is used for monitoring the data concurrency amount of the shopping cart service in real time, and when the data concurrency amount exceeds the preset processing capacity, the second-level cache is expanded and is a redis distributed cache.
CN202011372306.1A 2020-11-30 2020-11-30 Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service Active CN112584186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011372306.1A CN112584186B (en) 2020-11-30 2020-11-30 Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011372306.1A CN112584186B (en) 2020-11-30 2020-11-30 Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service

Publications (2)

Publication Number Publication Date
CN112584186A CN112584186A (en) 2021-03-30
CN112584186B true CN112584186B (en) 2023-02-21

Family

ID=75126673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011372306.1A Active CN112584186B (en) 2020-11-30 2020-11-30 Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service

Country Status (1)

Country Link
CN (1) CN112584186B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7941554B2 (en) * 2003-08-01 2011-05-10 Microsoft Corporation Sparse caching for streaming media
CN104301741B (en) * 2014-09-26 2018-06-22 北京奇艺世纪科技有限公司 A kind of data broadcast system and method
CN106937136B (en) * 2017-03-29 2020-05-12 武汉斗鱼网络科技有限公司 Data delay method and system based on statistical information of network live broadcast room
CN108665335B (en) * 2017-04-01 2021-09-14 北京京东尚科信息技术有限公司 Method for processing shopping cart data of shopping website
CN110136037A (en) * 2019-05-22 2019-08-16 毕成 A kind of internet precision educational counseling system based on big data and artificial intelligence
CN111464615B (en) * 2020-03-30 2023-06-20 北京达佳互联信息技术有限公司 Request processing method, device, server and storage medium

Also Published As

Publication number Publication date
CN112584186A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN1941899B (en) System and method for downloading contents
CN106790629A (en) Data synchronization unit and its realize the method for data syn-chronization, client access system
CN107943594B (en) Data acquisition method and device
CN104468395A (en) Direct-broadcasting-room channel access method and system
US20110307933A1 (en) Systems and methods for implementing server side push mechanisms for internet protocol television (iptv) updates
CN107231395A (en) Date storage method, device and system
CN110912980B (en) Order state synchronization method, system and storage medium
CN104375742A (en) Portable electronic device capable of displaying dynamic information when activated, system and method
CN102291629A (en) P2P (peer-to-peer) proxy on-demand system and implementation method applied to IPTV (Internet protocol television)
CN108282668B (en) Video acquisition method and system
CN112584186B (en) Live broadcast method and system based on establishment of E-commerce live broadcast shopping cart service
CN108076439B (en) Method and device for pushing messages based on wireless access point
CN115328406A (en) Data writing and acquiring method and device, electronic equipment and computer medium
CN107979629B (en) Distributed cache system and data cache method and device thereof
US9130780B2 (en) System and method for implementing interactive operations between a mobile communication terminal and an email box with multiple communication modes
JP6132021B2 (en) Delivery control apparatus and method, push delivery system, and computer program
CN110875947A (en) Data processing method and edge node equipment
KR101974434B1 (en) Server, user device and media play device for providing continuous play service
CN101313544B (en) Method, system and apparatus for uploading user proxy archive information
CN112949326B (en) Information query method, device, equipment and computer readable medium
CN101437199B (en) Mobile stream medium terminal capable of supporting fast switching scene
CN101459726B (en) Scene buffering updating method and mobile stream media terminal supporting the method
CN101459685B (en) Mobile stream media terminal for supporting scene status management
EP3910911A1 (en) Method for service decision distribution among multiple terminal devices and system
CN113364830A (en) Cache optimization method and system for long link

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
GR01 Patent grant
GR01 Patent grant