CN108153803B - Data acquisition method and device and electronic equipment - Google Patents

Data acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN108153803B
CN108153803B CN201711143069.XA CN201711143069A CN108153803B CN 108153803 B CN108153803 B CN 108153803B CN 201711143069 A CN201711143069 A CN 201711143069A CN 108153803 B CN108153803 B CN 108153803B
Authority
CN
China
Prior art keywords
data
service request
type
live broadcast
database
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
CN201711143069.XA
Other languages
Chinese (zh)
Other versions
CN108153803A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201711143069.XA priority Critical patent/CN108153803B/en
Publication of CN108153803A publication Critical patent/CN108153803A/en
Application granted granted Critical
Publication of CN108153803B publication Critical patent/CN108153803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests

Abstract

The embodiment of the invention provides a data acquisition method, a data acquisition device and electronic equipment, wherein the method comprises the following steps: receiving a live broadcast service request; converting the live broadcast service request into a logic description statement; and acquiring the service data requested by the live service request from a stored database according to the logic description statement, wherein the database receives and stores the original data generated by a plurality of service nodes in real time. By the data acquisition method, the data acquisition device and the electronic equipment, time overhead in the data acquisition process can be reduced.

Description

Data acquisition method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data acquisition method and apparatus, and an electronic device.
Background
With the development of services, more and more live service requests need to obtain multi-node data from a service end to meet, for example, data of a plurality of service systems.
In the existing method, aiming at a live broadcast service request of a client, a server calls data generated by a plurality of service nodes, and combines the data of the plurality of service nodes to obtain the data meeting the request of the live broadcast service request of the client.
However, the inventor finds that the prior art has at least the following problems in the process of implementing the invention:
the data calling from the multiple service nodes needs to be called for multiple times and the data of the multiple service nodes are combined, so that excessive time is occupied, and the time overhead is large in the data acquisition process.
Disclosure of Invention
The embodiment of the invention aims to provide a data acquisition method, a data acquisition device and electronic equipment so as to reduce time overhead in a data acquisition process. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a data acquisition method, including:
receiving a live broadcast service request;
converting the live broadcast service request into a logic description statement;
and acquiring the service data requested by the live broadcast service request from a stored database according to the logic description statement, wherein the database receives and stores the original data generated by a plurality of service nodes in real time.
Optionally, the step of storing the raw data in the database includes:
obtaining the raw data, the raw data comprising: text type data, video type data and audio type data;
determining a type of the raw data, the type comprising: text class, video class, and audio class;
adding a type label to each original data according to different types of each original data, wherein the type label comprises: text type labels, video type labels and audio type labels;
and storing the original data into the database in a classified manner according to the difference of the type labels.
Optionally, the step of obtaining service data requested by the live broadcast service request from a stored database according to the logic description statement includes:
determining the category to which the service data to be acquired belongs according to the logic description statement, wherein the category comprises: text class, video class, and audio class;
and according to the category, acquiring the service data requested by the live broadcast service request from the original data of the corresponding category in the stored database.
Optionally, the receiving a live service request includes:
receiving a live broadcast service request sent by a client;
after the service data requested by the live service request is obtained from the stored database, the method further includes:
and sending the service data to the client.
Optionally, the database includes Couchbase, and the step of converting the live broadcast service request into a logic description statement includes:
and analyzing the live broadcast service request through a relational description language N1QL, and converting the live broadcast service request into a logic description statement.
In a second aspect, an embodiment of the present invention provides a data acquisition apparatus, including:
the receiving module is used for receiving a live broadcast service request;
the conversion module is used for converting the live broadcast service request into a logic description statement;
and the first acquisition module is used for acquiring the service data requested by the live broadcast service request from a stored database according to the logic description statement, wherein the database receives and stores the original data generated by a plurality of service nodes in real time.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain the raw data, where the raw data includes: text type data, video type data and audio type data;
a determining module for determining a type of the raw data, the type comprising: text class, video class, and audio class;
an adding module, configured to add a type tag to each piece of original data according to a difference between types of each piece of original data, where the type tag includes: text type labels, video type labels and audio type labels;
and the storage module is used for storing the original data into the database in a classified manner according to the difference of the type labels.
Optionally, the first obtaining module includes:
a determining submodule, configured to determine, according to the logic description statement, a category to which the service data to be acquired belongs, where the category includes: text class, video class, and audio class;
and the obtaining submodule is used for obtaining the service data requested by the live broadcast service request from the original data of the corresponding category in the stored database according to the category.
Optionally, the receiving module is specifically configured to receive a live broadcast service request sent by a client;
the device, still include:
and the sending module is used for sending the service data to the client.
Optionally, the database includes a Couchbase, and the conversion module is specifically configured to analyze the live broadcast service request through a relational description language N1QL, and convert the live broadcast service request into a logic description statement.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the first aspect when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method steps of the first aspect described above.
In yet another aspect of the present invention, the present invention further provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method steps of the first aspect.
According to the data acquisition method, the data acquisition device and the electronic equipment provided by the embodiment of the invention, the service data requested by the live broadcast service request is directly acquired from the database through the logic description statement corresponding to the live broadcast service request, and the method, the device and the electronic equipment do not need to call for multiple times from a plurality of service nodes and combine the called data after receiving the live broadcast service request. Thus, the time overhead in the data acquisition process is reduced; meanwhile, in the live broadcast service request with strict time requirement, the real-time performance is improved. In addition, aiming at the live broadcast service request with the same type of difference of parameters, repeated calling and combining processes are not needed, and resource waste is reduced. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
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.
Fig. 1 is a flowchart of a data acquisition method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating saving raw data to a database according to an embodiment of the present invention;
FIG. 3 is another flow chart of a data acquisition method according to an embodiment of the present invention;
FIG. 4 is a flow chart of an embodiment provided by the present invention;
fig. 5 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
With the development of services, more and more service requests need to be satisfied by acquiring multi-node data from a server. Therefore, for the service request, the server side calls data from a plurality of different service systems, and then combines the called data to obtain the data requested by the service request. However, invoking data from multiple service systems and combining the data makes the time overhead too large. Some service requests have strict time requirements, for example, live video services.
In addition, there is an objective law in the service requests of different clients, and the server is directed to a certain type of service in a certain period of time, such as: and returning to different clients aiming at the same live broadcast, namely different users are the same data. However, because different clients may have differences in the parameters of the same service request, although the finally returned data is the same, for each service request of a client, the server needs to call for many times, and then combines the data obtained after calling to obtain the data meeting the service request of the client, so that the repetitive work of the server is caused, and on one hand, the time overhead in the data acquisition process is too large; on the other hand, the resource waste is also caused.
In order to reduce the time overhead and the resource waste in the data acquisition process and better meet the service request, the embodiment of the invention provides a data acquisition method, which is mainly aimed at live broadcast services. The method comprises the steps that original data generated by a plurality of service nodes are received in real time and stored in a database; after receiving the live broadcast service request, analyzing the live broadcast service request, converting the live broadcast service request into a logic description statement, and further acquiring service data requested by the live broadcast service request from a stored database according to the logic description statement. Therefore, the data are subjected to descriptive assembly by using the relational structure of the data through the logic description statements, so that the service data requested by the live broadcast service request can be acquired at one time according to the logic description statements, and the time overhead in the data acquisition process is reduced; meanwhile, the waste of resources can be reduced.
An embodiment of the present invention provides a data acquisition method, as shown in fig. 1, including:
s101, receiving a live broadcast service request.
The method provided by the embodiment of the invention can be applied to electronic equipment. Specifically, the electronic device may be a desktop computer, a portable computer, an intelligent mobile terminal, and the like.
S102, converting the live broadcast service request into a logic description statement.
Similar to the programmed process, the live service request is analyzed and converted into a logical descriptive statement. Specifically, the conversion of the live service request into a logical description statement may be implemented by a programming language or the like.
S103, according to the logic description statement, the service data requested by the live broadcast service request is obtained from a stored database, wherein the database receives and stores the original data generated by a plurality of service nodes in real time.
And storing the original data generated by the plurality of service nodes into a database in real time. For example, raw data from multiple service nodes may be saved in a database in the form of a table, as shown in table 1 below. Specifically, different service nodes may also be identified by an IP (Internet Protocol) address and the like corresponding to the service node.
TABLE 1
Figure BDA0001471863140000061
In addition, the live broadcast service is real-time, and historical data does not have great influence on the current live broadcast service. Therefore, in the actual application process, only the raw data generated within the preset time period can be saved in the database, and the saved raw data before the preset time period is removed in real time. For example, the original data generated within the last 3 days is saved, and the original data saved 3 days ago is erased. Therefore, the problems that the database space is insufficient and the like caused by continuous increase of the original data can be avoided.
The database holds the data in the same way as the rules of the logical description statements used. Therefore, according to the logic description statement corresponding to the live broadcast service request, the service data requested by the live broadcast service request can be obtained from the stored database. Specifically, data requested by the live broadcast service request is subjected to descriptive assembly through a logic description statement corresponding to the live broadcast service request, so that the service data requested by the live broadcast service request can be directly obtained from a database after the descriptive assembly.
For example, specifically, the service request is live broadcast, and the converted corresponding logic description statement is local query _ string.format ('select cache _ name.. from cache _ name where data.x.)% s'. and data.entry.a > -000 and data.entry.b [ -000 '. and data.entry.c > -000 and data.entry.c [% s000order by. entry.c. desc limit 1', lc, ngx _ now _ low _3, ngx _ now, ngx _ now, ngx _ now _ right _3), and executes an N1QL statement query: and local value, error, query (query), wherein the value obtained in this way is the service data requested by the live broadcast service request.
According to the data acquisition method provided by the embodiment of the invention, the service data requested by the live broadcast service request is directly acquired from the database through the logic description statement corresponding to the live broadcast service request, and the method does not need to call from a plurality of service nodes for a plurality of times and combine the called data after receiving the live broadcast service request. This reduces the time overhead in the data acquisition process.
In an alternative embodiment of the present invention, the database may include Couchbase. The live service request may be parsed by the relational description language N1QL and converted into a logical description statement denoted N1 QL.
N1QL is a Query Language for introducing SQL (Structured Query Language) into a file database, N1QL can operate on a data model JSON (JavaScript Object Notation) that does not conform to the first schema, and N1QL can extend operations on tables and rows and the like of conventional SQL to JSON.
In the data acquisition method provided by the embodiment of the invention, the live broadcast service request is converted into the logic description statement through N1QL, so that the descriptive assembly of the data can be realized, the time overhead and the resource waste in the data acquisition process are reduced, and the operation of the table, the row and the like of the traditional SQL can be expanded to JSON through N1QL, so that the complication and diversification of the data can be supported. Meanwhile, N1QL and Couchbase are combined, service access times similar to live broadcast service requests and the like are effectively reduced, and instantaneity is improved.
In an alternative embodiment of the present invention, as shown in fig. 2, the step of storing the original data in the database includes:
s201, acquiring original data.
The raw data may include: text-type data, video-type data, and audio-type data, and so on.
S202, determining the type of the original data.
The types of raw data may include: text class, video class, and audio class, among others.
For example, when the original data is text data, determining that the type of the original data is a text class; when the original data is video data, determining the type of the original data to be a video type; and when the original data is audio data, determining the type of the original data to be audio.
And S203, adding a type label to each original data according to different types of each original data.
The type tag may include: text class tags, video class tags, and audio class tags, among others.
The types of the raw data generated by the service node may be different, and different types of labels may be added for different types of raw data in order to store the data in a database in a classified manner. For example, when the type of the original data is determined to be a text class, a text class label is added to the original data; when the type of the original data is determined to be a video type, adding a video type label to the original data; and when the type of the original data is determined to be the audio class, adding an audio class label to the original data.
And S204, storing the original data into a database in a classified manner according to different type labels.
Specifically, the original data may be saved in the database in the form shown in table 2, where the type tag 1, the type tag 2, and the type tag 3 in table 2 may be text type tags, video type tags, or audio type tags, and the like.
TABLE 2
Figure BDA0001471863140000081
In an optional embodiment of the present invention, the step of acquiring service data requested by a live broadcast service request from a stored database according to a logic description statement includes, as shown in fig. 3:
s301, determining the category of the service data to be acquired according to the logic description statement.
The category to which the service data to be acquired belongs may also be understood as the type of the service data to be acquired. The categories may include: text class, video class, and audio class, etc.
And analyzing the category of the data requested by the live broadcast service request corresponding to the logic description statement represented in the logic description statement. For example, for a logic description statement corresponding to the live broadcast service request, the data requested by the live broadcast service request, that is, the category to which the service data to be acquired belongs is video data, audio data, or the like, is determined.
S302, according to the category, acquiring the service data requested by the live broadcast service request from the original data of the corresponding category in the stored database.
According to the category to which the service data to be acquired belongs, the service data is directly matched with the category in the database, specifically, the service data can be matched with the type label, and the service data requested by the live broadcast service request is acquired from the original data of the corresponding category in the stored database.
For example, when it is determined that the category to which the service data to be acquired belongs is the type corresponding to the type tag 1 in table 2, data corresponding to all the type tags 1, for example, the original data 1, is determined in the database; and then, acquiring service data requested by the live broadcast service request from data corresponding to the type tag 1.
Therefore, the required data can be quickly found according to the data types, the original data matched with the service data requested by the live broadcast service request does not need to be found from all the data stored in the database, and the speed of the data acquisition process is improved.
The embodiment of the present invention further provides a specific embodiment, as shown in fig. 4.
The plurality of service nodes send the generated data to the data acquisition module in real time, the data is original data, and the plurality of service nodes can comprise basic service nodes, other service nodes and the like. The data acquisition module transmits the acquired data to the database Couchbase through the data pushing module, and the data can be respectively stored as first data, second data and the like in the Couchbase according to type, space size and the like. Of course, the data may also be stored in multiple couchbases. The data of a plurality of service nodes are stored in the database in real time.
The client sends a live broadcast service request to the server, and the server receives the live broadcast service request, analyzes the live broadcast service request, and converts the live broadcast service request into a logic description statement represented by N1 QL. Specifically, the front-end machine nginn of the server analyzes the live broadcast service request through the relational description language N1QL, and converts the live broadcast service request into a logical description statement represented by N1 QL. And then, acquiring the service data requested by the live service request from the stored database according to the logic description statement. And finally, sending the acquired service data to the client.
In the data acquisition method provided by the embodiment of the invention, data generated by a plurality of service nodes is stored in a database in real time, after a server receives a live broadcast service request sent by a client, the live broadcast service request is converted into a corresponding logic description statement, and the service data requested by the live broadcast service request is directly acquired from the database according to the logic description statement, so that the descriptive assembly of the data can be realized, and the time overhead in the data acquisition process is reduced.
An embodiment of the present invention provides a data acquisition apparatus, as shown in fig. 5, including:
a receiving module 501, configured to receive a live broadcast service request;
a conversion module 502, configured to convert the live broadcast service request into a logic description statement;
a first obtaining module 503, configured to obtain, according to the logic description statement, service data requested by the live broadcast service request from a stored database, where the database receives and stores, in real time, original data generated by a plurality of service nodes.
The data acquisition device provided by the embodiment of the invention directly acquires the service data requested by the live broadcast service request from the database through the logic description sentence corresponding to the live broadcast service request, and does not need to call from a plurality of service nodes for a plurality of times and combine the called data after receiving the live broadcast service request. This reduces the time overhead in the data acquisition process.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain the raw data, where the raw data includes: text type data, video type data and audio type data;
a determining module for determining a type of the raw data, the type comprising: text class, video class, and audio class;
an adding module, configured to add a type tag to each piece of original data according to a difference between types of each piece of original data, where the type tag includes: text type labels, video type labels and audio type labels;
and the storage module is used for storing the original data into the database in a classified manner according to different type labels.
Optionally, the first obtaining module 503 includes:
the determining submodule is used for determining the category to which the service data to be acquired belongs according to the logic description statement, and the category comprises: text class, video class, and audio class;
and the acquisition submodule is used for acquiring the service data requested by the live broadcast service request from the original data of the corresponding category in the stored database according to the category.
Optionally, the receiving module 501 is specifically configured to receive a live broadcast service request sent by a client;
the device also comprises:
and the sending module is used for sending the service data to the client.
Optionally, the database includes a Couchbase, and the conversion module 502 is specifically configured to analyze the live broadcast service request through a relational description language N1QL, and convert the live broadcast service request into a logic description statement.
It should be noted that, the data acquisition apparatus according to the embodiment of the present invention is an apparatus applying the data acquisition method, and all embodiments of the data acquisition method are applicable to the apparatus and can achieve the same or similar beneficial effects.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the method steps of the data acquisition method when executing the program stored in the memory 603.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The electronic device provided by the embodiment of the invention directly acquires the service data requested by the live broadcast service request from the database through the logic description sentence corresponding to the live broadcast service request, and does not need to call for many times from a plurality of service nodes and combine the called data after receiving the live broadcast service request. This reduces the time overhead in the data acquisition process.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the data acquisition method described in any one of the above embodiments.
The computer-readable storage medium provided by the embodiment of the invention directly obtains the service data requested by the live broadcast service request from the database through the logic description statement corresponding to the live broadcast service request, and does not need to call from a plurality of service nodes for a plurality of times and combine the called data after receiving the live broadcast service request. This reduces the time overhead in the data acquisition process.
In yet another embodiment, the present invention further provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the data acquisition method described in any of the above embodiments.
The computer program product provided by the embodiment of the invention directly acquires the service data requested by the live broadcast service request from the database through the logic description sentence corresponding to the live broadcast service request, and does not need to call for many times from a plurality of service nodes and combine the called data after receiving the live broadcast service request. This reduces the time overhead in the data acquisition process.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A method of data acquisition, comprising:
receiving a live broadcast service request;
converting the live broadcast service request into a logic description statement;
acquiring service data requested by the live broadcast service request from a stored database according to the logic description statement, wherein the database receives and stores original data generated by a plurality of service nodes in real time; the database stores data in the same way as the rules of the logical description statements.
2. The method of claim 1, wherein the step of saving the raw data to the database comprises:
obtaining the raw data, the raw data comprising: text type data, video type data and audio type data;
determining a type of the raw data, the type comprising: text class, video class, and audio class;
adding a type label to each original data according to different types of each original data, wherein the type label comprises: text type labels, video type labels and audio type labels;
and storing the original data into the database in a classified manner according to the difference of the type labels.
3. The method of claim 2, wherein the step of obtaining the service data requested by the live service request from the stored database according to the logic description statement comprises:
determining the category to which the service data to be acquired belongs according to the logic description statement, wherein the category comprises: text class, video class, and audio class;
and according to the category, acquiring the service data requested by the live broadcast service request from the original data of the corresponding category in the stored database.
4. The method of claim 1, wherein receiving the live service request comprises:
receiving the live broadcast service request sent by a client;
after the service data requested by the live service request is obtained from the stored database, the method further includes:
and sending the service data to the client.
5. The method according to any of claims 1 to 4, wherein the database comprises Couchbase, and the step of converting the live service request into a logical descriptive statement comprises:
and analyzing the live broadcast service request through a relational description language N1QL, and converting the live broadcast service request into a logic description statement.
6. A data acquisition apparatus, comprising:
the receiving module is used for receiving a live broadcast service request;
the conversion module is used for converting the live broadcast service request into a logic description statement;
a first obtaining module, configured to obtain, according to the logic description statement, service data requested by the live broadcast service request from a stored database, where the database receives and stores, in real time, original data generated by multiple service nodes; the database stores data in the same way as the rules of the logical description statements.
7. The apparatus of claim 6, further comprising:
a second obtaining module, configured to obtain the raw data, where the raw data includes: text type data, video type data and audio type data;
a determining module for determining a type of the raw data, the type comprising: text class, video class, and audio class;
an adding module, configured to add a type tag to each piece of original data according to a difference between types of each piece of original data, where the type tag includes: text type labels, video type labels and audio type labels;
and the storage module is used for storing the original data into the database in a classified manner according to the difference of the type labels.
8. The apparatus of claim 7, wherein the first obtaining module comprises:
a determining submodule, configured to determine, according to the logic description statement, a category to which the service data to be acquired belongs, where the category includes: text class, video class, and audio class;
and the obtaining submodule is used for obtaining the service data requested by the live broadcast service request from the original data of the corresponding category in the stored database according to the category.
9. The apparatus according to claim 6, wherein the receiving module is specifically configured to receive a live service request sent by a client;
the device, still include:
and the sending module is used for sending the service data to the client.
10. The apparatus according to any one of claims 6 to 9, wherein the database includes Couchbase, and the conversion module is specifically configured to analyze the live service request through a relational description language N1QL, and convert the live service request into a logical description statement.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
CN201711143069.XA 2017-11-17 2017-11-17 Data acquisition method and device and electronic equipment Active CN108153803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711143069.XA CN108153803B (en) 2017-11-17 2017-11-17 Data acquisition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711143069.XA CN108153803B (en) 2017-11-17 2017-11-17 Data acquisition method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108153803A CN108153803A (en) 2018-06-12
CN108153803B true CN108153803B (en) 2021-04-02

Family

ID=62467974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711143069.XA Active CN108153803B (en) 2017-11-17 2017-11-17 Data acquisition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108153803B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241157B (en) * 2018-08-02 2021-09-07 中央电视台 Data calling method and device, communication equipment and storage medium
CN109064806A (en) * 2018-09-26 2018-12-21 北京奇艺世纪科技有限公司 A kind of video system with instructional function, implementation method and electronic equipment
CN111680108B (en) * 2019-03-11 2023-11-03 杭州海康威视数字技术股份有限公司 Data storage method and device and data acquisition method and device
CN110032608B (en) * 2019-04-22 2022-09-06 江苏满运软件科技有限公司 System data information assembling method and device, storage medium and electronic equipment
CN110866107A (en) * 2019-10-12 2020-03-06 浙江大搜车软件技术有限公司 Method and device for generating material corpus, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301773A (en) * 2014-09-28 2015-01-21 四川长虹电器股份有限公司 Method for making network broadcast channel playing and DTV channel playing compatible
CN104935949A (en) * 2015-06-18 2015-09-23 深圳市茁壮网络股份有限公司 Method, device and system for downloading live broadcast video data
CN105898372A (en) * 2015-12-15 2016-08-24 乐视云计算有限公司 Live video to video-on-demand method and system
CN106303553A (en) * 2016-08-25 2017-01-04 安徽协创物联网技术有限公司 A kind of network direct broadcasting plateform system
CN106534978A (en) * 2016-10-14 2017-03-22 乐视控股(北京)有限公司 Live program state updating method and device
CN107071506A (en) * 2017-03-17 2017-08-18 武汉斗鱼网络科技有限公司 A kind of method and system for pushing barrage

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572215A (en) * 2011-12-14 2012-07-11 深圳市贝尔信智能系统有限公司 City-class visual video analysis method and server
CN105338026B (en) * 2014-07-24 2018-10-09 阿里巴巴集团控股有限公司 The acquisition methods of data resource, device and system
US20170228600A1 (en) * 2014-11-14 2017-08-10 Clipmine, Inc. Analysis of video game videos for information extraction, content labeling, smart video editing/creation and highlights generation
CN105451096B (en) * 2015-12-02 2018-08-10 北京暴风云科技有限公司 Network direct broadcasting system and live broadcasting method
CN105847398A (en) * 2016-04-25 2016-08-10 乐视控股(北京)有限公司 Business scheduling method, scheduling server and business server
CN106951573A (en) * 2017-04-27 2017-07-14 努比亚技术有限公司 A kind of living broadcast interactive data load method, server and computer-readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301773A (en) * 2014-09-28 2015-01-21 四川长虹电器股份有限公司 Method for making network broadcast channel playing and DTV channel playing compatible
CN104935949A (en) * 2015-06-18 2015-09-23 深圳市茁壮网络股份有限公司 Method, device and system for downloading live broadcast video data
CN105898372A (en) * 2015-12-15 2016-08-24 乐视云计算有限公司 Live video to video-on-demand method and system
CN106303553A (en) * 2016-08-25 2017-01-04 安徽协创物联网技术有限公司 A kind of network direct broadcasting plateform system
CN106534978A (en) * 2016-10-14 2017-03-22 乐视控股(北京)有限公司 Live program state updating method and device
CN107071506A (en) * 2017-03-17 2017-08-18 武汉斗鱼网络科技有限公司 A kind of method and system for pushing barrage

Also Published As

Publication number Publication date
CN108153803A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN108153803B (en) Data acquisition method and device and electronic equipment
CN109062952B (en) Data query method and device and electronic equipment
US10839038B2 (en) Generating configuration information for obtaining web resources
US10043220B2 (en) Method, device and storage medium for data processing
US9686152B2 (en) Techniques for tracking resource usage statistics per transaction across multiple layers of protocols
CN109033403B (en) Method, apparatus and storage medium for searching blockchain data
EP2924633A1 (en) A system and method for extracting a business rule embedded in an application source code
CN107360261B (en) HTTP request processing method and device and electronic equipment
CN109033406B (en) Method, apparatus and storage medium for searching blockchain data
WO2021218144A1 (en) Data processing method and apparatus, computer device, and storage medium
US11188443B2 (en) Method, apparatus and system for processing log data
CN110209700B (en) Data stream association method and device, electronic equipment and storage medium
CN109101607B (en) Method, apparatus and storage medium for searching blockchain data
CN111782692B (en) Frequency control method and device
CN101916283B (en) Method for acquiring link information from dynamic webpage and server thereof
CN110321252B (en) Skill service resource scheduling method and device
CN109086414B (en) Method, apparatus and storage medium for searching blockchain data
CN113157734A (en) Data processing method, device and equipment based on search framework and storage medium
CN112883088B (en) Data processing method, device, equipment and storage medium
CN116894078A (en) Information interaction method, device, electronic equipment and medium
CN109145209B (en) Method, apparatus and storage medium for searching blockchain data
CN115292327A (en) Multi-table association method and device, equipment and storage medium
CN112783615B (en) Data processing task cleaning method and device
CN113138943B (en) Method and device for processing request
CN113312540A (en) Information processing method, device, equipment, system and readable 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
GR01 Patent grant
GR01 Patent grant