CN112492353B - Processing method, device, equipment and storage medium for data in live broadcasting room - Google Patents

Processing method, device, equipment and storage medium for data in live broadcasting room Download PDF

Info

Publication number
CN112492353B
CN112492353B CN201910866699.2A CN201910866699A CN112492353B CN 112492353 B CN112492353 B CN 112492353B CN 201910866699 A CN201910866699 A CN 201910866699A CN 112492353 B CN112492353 B CN 112492353B
Authority
CN
China
Prior art keywords
data
target
field
sub
target sub
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
CN201910866699.2A
Other languages
Chinese (zh)
Other versions
CN112492353A (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.)
Hangzhou Shancao Interactive Entertainment Technology Co ltd
Huijiawang Tianjin Technology Co ltd
Original Assignee
Hangzhou Shancao Interactive Entertainment Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Shancao Interactive Entertainment Technology Co ltd filed Critical Hangzhou Shancao Interactive Entertainment Technology Co ltd
Priority to CN201910866699.2A priority Critical patent/CN112492353B/en
Publication of CN112492353A publication Critical patent/CN112492353A/en
Application granted granted Critical
Publication of CN112492353B publication Critical patent/CN112492353B/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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data
    • 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/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • 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/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • H04N21/2355Processing of additional data, e.g. scrambling of additional data or processing content descriptors involving reformatting operations of additional data, e.g. HTML pages

Abstract

The embodiment of the invention discloses a processing method, a processing device, processing equipment and a storage medium for data in a live broadcast room. The method comprises the following steps: acquiring target data stored in a live broadcasting room in a preset data structure, wherein the target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data; and analyzing the target data to obtain each target sub-data for data flow in the live broadcasting room. By the technical scheme, on the basis of guaranteeing the data integrity in the live broadcasting room, the data containing repeated information in the live broadcasting room is simplified, and therefore data transmission flow is saved.

Description

Processing method, device, equipment and storage medium for data in live broadcasting room
Technical Field
The embodiment of the invention relates to a computer technology, in particular to a processing method, a processing device, processing equipment and a storage medium for data in a live broadcast room.
Background
There is a type of data in the network living broadcast room, where the data includes multiple pictures (e.g., different resolution, different size pictures, different icons in different value states, etc.), and the information of each picture includes the complete address information of the picture, such as the same domain name information and the different picture storage path information. Such data may be gift data, prop data, bullet screen data, etc. in a living room.
Taking gift data as an example, after the client side of the living broadcasting room sends out a network data request, the server side packages information of all pictures in the requested gift data into an object in a JSON format, and sends the JSON object to the client side of the living broadcasting room. In this way, the returned JSON object contains a lot of repeated data, such as domain name information of a picture, which results in an increase in the data volume of the returned data and excessive traffic loss in the data transmission process.
Disclosure of Invention
The embodiment of the invention provides a processing method, a device, equipment and a storage medium for data in a live broadcasting room, which are used for simplifying the data containing repeated information in the live broadcasting room on the basis of guaranteeing the data integrity in the live broadcasting room, so that the data transmission flow is saved.
In a first aspect, an embodiment of the present invention provides a method for processing data in a live broadcast room, including:
acquiring target data stored in a live broadcasting room in a preset data structure, wherein the target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data;
and analyzing the target data to obtain each target sub-data for data flow in the live broadcasting room.
In a second aspect, an embodiment of the present invention further provides a processing device for data in a live broadcast room, where the device includes:
the target data acquisition module is used for acquiring target data stored in a live broadcasting room in a preset data structure, wherein the target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data;
and the data processing module is used for analyzing the target data to obtain each target sub-data for data flow in the live broadcasting room.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing data in a live broadcast room provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the method for processing data in a live broadcast room provided in any embodiment of the present invention.
According to the embodiment of the invention, through designing the preset data structure comprising the shared field and the target sub-data field, each target sub-data in the target data is split into the data elements with information sharing and the residual data with different information, the data volume of the target data is simplified on the basis of ensuring the integrity and usability of the target data, and therefore the flow loss in the process of transmitting the target data is reduced.
Drawings
Fig. 1 is a flowchart of a processing method of data in a live broadcast room according to a first embodiment of the present invention;
fig. 2 is a flowchart of a processing method of data in a live broadcast room in a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a processing device for data in a live broadcast room according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
The processing method of the data in the live broadcasting room provided by the embodiment can be suitable for processing the data containing repeated information in the live broadcasting room, such as gift data, prop data, bullet screen data and the like. The method may be performed by a processing device for data in a living room, which may be implemented in software and/or hardware, and which may be integrated in an electronic device, such as typically a user terminal device, e.g. a mobile phone, a tablet computer or a desktop computer, etc., in which a client of the living room is installed. Referring to fig. 1, the method of the present embodiment includes:
s110, acquiring target data stored in a preset data structure in the live broadcasting room.
The target data refers to data to be processed in the live broadcast room client, and may be gift data, prop data, bullet screen data, or the like. The target data comprises at least two target sub-data of the same type, and each target sub-data comprises the same data element. The target sub-data is internal data of the target data, and contains information of which part is repeated with the data content of other target sub-data. The repeated information of the content is called as data elements. The preset data structure is a pre-designed data storage structure for simplifying the target data. The preset data structure comprises a sharing field and a target sub-data field, wherein the sharing field is used for storing data elements, and the target sub-data field is used for storing residual data except the data elements in the target sub-data.
In the related art, there is no shared field in the original data storage structure corresponding to the target data, but only the target sub-data field, that is, the target sub-data field stores all data of the data elements and the remaining data included in one target sub-data, and the data splitting is not performed, so that a plurality of data elements are stored in the target data, and data redundancy is caused. In the embodiment of the invention, the shared field is newly added in the preset data structure, and the target sub-data field is reserved, so that each target sub-data can be split, the shared field stores data elements, and each target sub-data field stores data difference parts in the target sub-data, namely the rest data in the target sub-data. Thus, the redundant data amount in the target data can be reduced, and the data amount of the target data can be simplified.
Illustratively, the target sub-data is picture information, the data elements are domain names in the picture information, and the remaining data are storage paths in the picture information. For example, the target data includes two picture types of target sub-data, namely 'https:// gfs-test-op.douyuqdn.cn/dygift/1533881378191. Png' and 'https:// gfs-test-op.douyuqdn.cn/dygift/1533881317525. Png', respectively, and the data elements are 'https:// gfs-test-op.douyuqdn.cn/dygift', and the rest data are respectively the storage paths of '1533881378191. Png' and '1533881317525. Png'.
When the live room client needs to perform a corresponding operation (e.g. display) with the target data, the target data is first requested from the network (or server) through a standard HTTP request. When the network side (or the server side) receives the data request, the target data is packaged according to a preset data structure to form data which is convenient for network transmission, for example, the target data in a JSON format is formed, and the JSON format meets the requirement of the preset data structure. The network (or server) then sends the target data to the live room client. The target data stored according to the preset data structure is acquired by the live broadcasting room client.
S120, analyzing the target data to obtain each target sub-data for data flow in the live broadcasting room.
After the target data is obtained by the client side of the living broadcast room, the target data is analyzed to realize processing of the target data, and then all the sub-data (the internal data of the target data) contained in the target data are obtained, so that all the target sub-data and other sub-data are used for data circulation in the living broadcast room, such as data display, operation, storage and the like.
Illustratively, parsing the target data to obtain target sub-data includes:
A. the target data is parsed to obtain data elements and respective remaining data.
According to the above description, the target sub-data in the target data is split into the data element and the remaining data, and if the target data is directly parsed according to the parsing method of the JSON data, only the remaining data (for example, the storage path of the picture) in the target sub-data can be obtained, but the complete target sub-data cannot be directly obtained. Therefore, in the processing process of the target data in this embodiment, the target data needs to be analyzed first to obtain the data elements and the remaining data respectively, and then the split data is assembled for the second time so as to obtain the target sub-data with complete data, so that the flow loss in the data transmission process can be reduced as much as possible, the acquisition efficiency of the target data is improved, and the access convenience of the target data in the subsequent operation is improved.
Illustratively, parsing the target data to obtain the data elements and each remaining data includes: and extracting data elements and each residual data from the target data based on a character string processing algorithm according to the shared field and each target sub-data field.
The manner of acquiring the data elements and the remaining data from the target data may be: because the target data is stored in the form of JSON character strings, the target data can be subjected to character string splitting and extraction by utilizing the shared field and the target sub-data field according to a character string processing algorithm so as to extract data elements and each residual data from the target data respectively. Although the JSON format hierarchical relationship is complex, the string extraction operation is correspondingly complex, but the operation does not need to convert the data format, and the data extraction logic can be simplified to a certain extent.
B. Generating each target sub-data according to the data elements and each residual data, and storing each target sub-data into a corresponding target sub-data field to cover the residual data in each target sub-data field, thereby completing the processing of the target data.
The idea of secondary assembly in this embodiment is: and automatically adding missing data elements into the residual data corresponding to the target sub-data field, and backfilling the residual data added with the data elements to a field value position corresponding to the corresponding target sub-data field. And in the implementation, performing character string splicing on the obtained data elements and each piece of residual data. For example, the data elements "https:// gfs-test-op.douyuccdn.cn/dygift" are concatenated with the remaining data "1533881378191.Png" and "1533881317525.Png", respectively, to obtain the complete target sub-data "https:// gfs-test-op.douyuccdn.cn/dygift/1533881378191. Png" and "https:// gfs-test-op.douyuccdn.cn/dygift/1533831317525. Png". And backfilling the complete target sub-data into the corresponding target sub-data field, and covering the residual data corresponding to the target sub-data field. For example, the original corresponding field value of the target sub-data field "giftPic" is "1533881378191.Png", and after the above data processing, the corresponding field value of the target sub-data field "giftPic" is "https:// gfs-test-op.douyuqdn.cn/dygift/1533881378191. Png". Therefore, the data structure integrity of the target table data can be ensured, the integrity of the target sub-data can be ensured, and the data access in the subsequent data circulation process is facilitated.
According to the technical scheme, through designing the preset data structure comprising the shared field and the target sub-data field, each target sub-data in the target data is split into the data elements with information sharing and the residual data with information difference, and therefore the data volume of the target data is simplified on the basis of guaranteeing the integrity and usability of the target data, and the flow loss in the transmission process of the target data is reduced.
Example two
The present embodiment further optimizes "analysis target data, data elements, and each remaining data" based on the above embodiments. Wherein the same or corresponding embodiments as those described above the explanation of the terms of (a) is not repeated here. In this embodiment, target data is used as gift data. Referring to fig. 2, the processing method of data in a live broadcast room provided in this embodiment includes:
s210, acquiring target data stored in a preset data structure in the live broadcasting room.
The target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data.
For example, a part of data in the target data stored in the preset data structure may be exemplified as follows:
Figure BDA0002201477250000071
Figure BDA0002201477250000081
Figure BDA0002201477250000091
in the above target data, the field "picUrlPrefix" is a newly added shared field, and the fields "giftPic", "chatPic", "focusPic" and "bannerPics" are target sub-data fields.
S220, analyzing the target data to convert the target data into a target object of a JavaBean type, traversing a data list contained in the target object, and obtaining each field value and each sub-data object in the data list.
The target object is an object corresponding to the target data. The field value refers to a character string corresponding to each field in the data list. The child data object refers to a java bean object corresponding to a nested structure with a deeper hierarchy in the data list, that is, the child data object is of a java bean type.
And analyzing the target data and converting the target data from the JSON format to the JavaBean format. Since the hierarchy of gift data is deep, there may be a case that a plurality of beans are nested, and for convenience of subsequent description, all object information in JSON is directly described by means of its corresponding key+bean, where KEY represents KEY information in JSON.
For example, the entire gift data structure described above is described as AllGiftBean (the entire gift data is relatively special, without a key), the gift list data (i.e., the field "giftlist" and the data segments in brackets thereafter) will be described as giftListBean, the specific gift data in the list (e.g., the corresponding data segments of the fields "id", "picUrlPrefix", and "basicInfo") will be described as giftbaean, and so on to describe the relevant data Bean information.
Since the target sub data is in the data list, after the target object AllGiftBean is obtained, the data list corresponding to the giftList field in the target sub data needs to be accessed. First, the data list is subjected to the cavitation processing by the manner of allgiftbean. If the target data is null, the target data is indicated to have no data to be processed, and the data processing flow can be directly ended. Conversely, the data list giftListBan data in the target object is obtained by the target object accessing the data list field allgiftBan. Then, the data in the data list object giftListBaan is traversed by enhancing the for loop, specifically by for (GiftBean in giftListBean), so that one piece of data in the data list giftListBaan is obtained in each loop body, for example, a field value "869" corresponding to a field "id", a field value "https:// gfs-test-op.douyuccdn.cn/dygift", a sub-data object giftbaseInfobean, a sub-data object giftiefffectInfobean, and the like are shared.
S230, determining the data elements from the field values according to the shared field and the field corresponding to the field values.
Through the above operation, a plurality of field values can be obtained, wherein the field values comprise data elements corresponding to the shared field. At this time, the shared field is used as a search index, and a field value corresponding to the shared field is searched out from the obtained field values as a data element. For example, the shared field "picUrlPrefix" is matched with the fields of "id", "name" and "picUrlPrefix" obtained in S220, and when the matching is consistent, the field value "https:// gfs-test-op.douyuqdn.cn/dygift" corresponding to the matching consistent field "picUrlPrefix" is used as the data element determined from the field values.
S240, if the field corresponding to the sub data object is consistent with the preset field, accessing the target sub data field through the sub data object to obtain the residual data corresponding to the target sub data field.
The data segment corresponding to the preset field comprises a target sub-data field. According to the above description, the preset data structure is specially improved for the target sub-data, so that the processing of the target data needs to complete the assembly of the target sub-data. The target sub-data field corresponding to the target sub-data is predetermined, so that the target sub-data field can be used as a preset field. Illustratively, the target data is gift data, and the preset field at least includes a gift basic information field basicInfo and a gift special effect information field efffectinfo.
For each sub data object obtained in S220, the corresponding field is compared with a preset field. If the comparison results are consistent, the sub-data object is the bean object corresponding to the target sub-data that needs to be assembled twice. At this time, it may be first determined whether the sub data object is a null object, and when the sub data object is not a null object, the target sub data field included in the sub data object is accessed through the element access function in the sub data object, so as to obtain the field value corresponding to the target sub data field, that is, the remaining data.
For example, through giftbagin. giftPic, giftbase. chatPic and giftbase? The focusPic obtains the target sub data field giftPic, chatPic contained in the sub data object giftbaselnfobean and the remaining data corresponding to the focusPic, "1533881378191.Png", "1533881317525.Png", and "1533881326994.Gif", respectively. In the above code "? The role of "is to judge first"? Whether the previous object is empty or not, and executing the data access operation after the 'is not empty'.
Illustratively, accessing the target sub-data field through the sub-data object, obtaining the remaining data corresponding to the target sub-data field includes: if the preset field is a field corresponding to a sub-data object with a key value pair collection structure, calling an element traversing function through the sub-data object to obtain each key value pair object contained in the sub-data object; calling a value information acquisition function through a key value pair object to obtain a target sub-data list object contained in the key value pair object; traversing the target sub-data list object to obtain each residual data corresponding to the sub-data object.
According to the above example code of the target data, the data list of the target data includes the sub data object gifteffectinfoBean corresponding to the gift special effect information field efffectinfo in addition to the sub data object corresponding to the gift basic information field. In addition, the structure of the sub data object gifteffectinfoBean is more complex, which is a set with a key value pair set structure map property, so that special logic processing needs to be performed on the data, and a specific processing method is as follows:
first call element traversal functions in child data objects, such as giftban. For () to obtain a specific key value pair object in the map, for example, the key information is "55", and the value information is a data segment in the curly brace corresponding to the key information. And then, calling a value information acquisition function through the key value pair object to obtain a target sub-data list object contained in the key value pair object. The specific implementation process is as follows: the value information in the obtained key-value pair object is newly assigned to a local variable gifteffecteffect bean in the forEach by means of val giftEffectBean gifteffectinfeffect bean=it.value. Then through giftEffectBean. bannerPics? Is the entries? The method of the iterater () obtains the target sub-data list object iterater of the bannnerpicsBean object, and assigns it to the variable bannnerpicsItator object, and the specific implementation method is val bannerPicsIterator =giftEffectBean. bannerPics? Is the entries? An iterater (). Finally, on the basis of judging that the bannnerpicsItator object is not a null object, judging whether data in the bannnerpicsItator object needs to be processed or not through a while (bannnerpicsItator. HasNext ()) function calling mode. If there is data to be processed, then one entry object in the bannnerpicsItator is traversed and acquired by calling val entry=bannnerpicsItator.next (), then the entry is actually the storage path of the specific bannnerpics, i.e. one of the remaining data corresponding to the target sub-data, such as "xxxx1.Png", "xxxx1.Png" or "xxxx1.Png".
S250, generating each target sub-data according to the data elements and each residual data, and storing each target sub-data into a corresponding target sub-data field so as to cover the residual data in each target sub-data field, thereby completing the processing of the target data.
For the target sub-data field basicInfo, the string splicing and data coverage modes thereof can be as follows: giftbaen. Giftpic=giftbase. PicUrlPrefix+giftbase. Basicinfo? giftPic, giftbase. Chatpic=giftbase? chatPic and giftbase? Focuspic=GiftBan. PicUrlPrefix+GiftBan. Basicinfo? FocusPic. For the target sub-data field effectInfo, the string splicing and data coverage modes may be: val url=giftbase. PicUrlPrefix+entry. Value, which concatenates each remaining data in the target sub-data list object with a data element, assigns the concatenated long string to variable url, and then backfills the assembled complete target sub-data into the original data structure by calling the entry. Setvalue (url) method, thus completing the coverage of the corresponding remaining data.
According to the technical scheme, target data are analyzed to be converted into a target object of a JavaBean type, a data list contained in the target object is traversed, and field values and sub-data objects in the data list are obtained; determining data elements from the field values according to the shared field and the field corresponding to each field value; if the field corresponding to the sub data object is consistent with the preset field, accessing the target sub data field through the sub data object to obtain the residual data corresponding to the target sub data field. The method and the device realize rapid analysis of the data elements and each piece of residual data, thereby improving the data processing efficiency of the target data and the access convenience of the target sub-data in the target data.
Example III
The embodiment provides a processing device for data in a live broadcast room, referring to fig. 3, the device specifically includes:
the target data obtaining module 310 is configured to obtain target data stored in a preset data structure in a live broadcast room, where the target data includes at least two target sub-data of the same type, each target sub-data includes the same data element, the preset data structure includes a shared field and a target sub-data field, the shared field is used to store data elements, and the target sub-data field is used to store remaining data except the data elements in the target sub-data;
the data processing module 320 is configured to parse the target data to obtain each target sub-data, so as to be used for data streaming in the live broadcast room.
Optionally, the data processing module 320 includes:
the data analysis sub-module is used for analyzing the target data to obtain data elements and each piece of residual data;
and the data processing sub-module is used for generating each target sub-data according to the data elements and each residual data, storing each target sub-data into a corresponding target sub-data field so as to cover the residual data in each target sub-data field, and finishing the processing of the target data.
Optionally, the data parsing submodule is specifically configured to:
analyzing the target data to convert the target data into a target object of a JavaBean type, traversing a data list contained in the target object, and obtaining each field value and each sub-data object in the data list, wherein the sub-data object is of the JavaBean type;
determining data elements from the field values according to the shared field and the field corresponding to each field value;
if the field corresponding to the sub data object is consistent with the preset field, accessing the target sub data field through the sub data object to obtain residual data corresponding to the target sub data field, wherein the data segment corresponding to the preset field contains the target sub data field.
Further, the data parsing sub-module is specifically configured to:
if the preset field is a field corresponding to a child data object having a key-value pair aggregation structure, calling an element traversing function through the sub-data object to obtain each key value pair object contained in the sub-data object;
calling a value information acquisition function through a key value pair object to obtain a target sub-data list object contained in the key value pair object;
traversing the target sub-data list object to obtain each residual data corresponding to the sub-data object.
Optionally, the data parsing submodule is specifically configured to:
and extracting data elements and each residual data from the target data based on a character string processing algorithm according to the shared field and each target sub-data field.
Optionally, the target sub-data is picture information, the data element is a domain name in the picture information, and the remaining data is a storage path in the picture information.
Further, the target data is gift data, and the preset field at least comprises a gift basic information field and a gift special effect information field.
According to the processing device for the data in the live broadcasting room, the data volume of the target data is simplified on the basis of guaranteeing the integrity and usability of the target data, and therefore the flow loss in the process of transmitting the target data is reduced.
The processing device for the data in the live broadcasting room provided by the embodiment of the invention can execute the processing method for the data in the live broadcasting room provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the processing device for data in the live broadcasting room, each unit and module included are only divided according to the functional logic, but are not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Example IV
Referring to fig. 4, the present embodiment provides an electronic device, which includes: one or more processors 420; the storage device 410 is configured to store one or more programs, where the one or more programs are executed by the one or more processors 420, so that the one or more processors 420 implement a method for processing data in a live broadcast room according to the embodiment of the present invention, where the method includes:
acquiring target data stored in a live broadcasting room in a preset data structure, wherein the target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data;
and analyzing the target data to obtain each target sub-data for data flow in the live broadcasting room.
Of course, it will be appreciated by those skilled in the art that the processor 420 may also implement the technical scheme of the processing method of data in a live broadcast room according to any embodiment of the present invention.
The electronic device shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention. As shown in fig. 4, the electronic device includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of processors 420 in the device may be one or more, one processor 420 being taken as an example in fig. 4; the processor 420, the storage device 410, the input device 430, and the output device 440 in the apparatus may be connected by a bus or other means, as exemplified in fig. 4 by a bus 450.
The storage device 410 is used as a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as a program instruction/module corresponding to a processing method of data in a live broadcast room in an embodiment of the present invention (for example, a target data acquisition module and a data processing module in a processing device of data in a live broadcast room).
The storage device 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, the storage 410 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, storage 410 may further include memory located remotely from processor 420, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output 440 may include a display device such as a display screen.
Example five
The present embodiment provides a storage medium containing computer executable instructions which, when executed by a computer processor, are used to perform a method of processing data in a living room, the method comprising:
acquiring target data stored in a live broadcasting room in a preset data structure, wherein the target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data;
and analyzing the target data to obtain each target sub-data for data flow in the live broadcasting room.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the above method operations, and may also perform the related operations in the processing method of the data in the live broadcasting room provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to execute the processing method of data in a living room provided by the embodiments of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (7)

1. A method for processing data in a live broadcast room, comprising the steps of:
acquiring target data stored in a live broadcasting room in a preset data structure, wherein the target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data; the target data are data which need to be processed in the live broadcasting room client; the target data are gift data, prop data or bullet screen data;
analyzing the target data to obtain each target sub-data for data flow in a live broadcast room;
the parsing the target data to obtain each target sub-data includes: analyzing the target data, generating each target sub-data, and storing each target sub-data into a corresponding target sub-data field to cover the residual data in each target sub-data field;
analyzing the target data, and obtaining each target sub-data comprises the following steps:
parsing the target data to obtain the data elements and each of the remaining data;
generating each target sub-data according to the data elements and each residual data, and storing each target sub-data into a corresponding target sub-data field so as to cover the residual data in each target sub-data field, thereby completing the processing of the target data;
parsing the target data to include, with the data elements and each of the remaining data:
analyzing the target data to convert the target data into a target object of a JavaBean type, traversing a data list contained in the target object, and obtaining each field value and each sub-data object in the data list, wherein the sub-data object is of the JavaBean type;
determining the data element from each field value according to the shared field and the field corresponding to each field value;
if the field corresponding to the sub data object is consistent with a preset field, accessing the target sub data field through the sub data object to obtain the residual data corresponding to the target sub data field, wherein a data segment corresponding to the preset field contains the target sub data field;
accessing the target sub-data field through the sub-data object, and obtaining the remaining data corresponding to the target sub-data field includes:
if the preset field is a field corresponding to a sub-data object with a key value pair collection structure, calling an element traversing function through the sub-data object to obtain each key value pair object contained in the sub-data object;
calling a value information acquisition function through the key value pair object to obtain a target sub-data list object contained in the key value pair object;
and traversing the target sub-data list object to obtain each piece of residual data corresponding to the sub-data object.
2. The method of claim 1, wherein parsing the target data to obtain the data elements and each of the remaining data comprises:
and extracting the data elements and the residual data from the target data based on a character string processing algorithm according to the shared field and each target sub-data field.
3. The method according to any of claims 1-2, wherein the target sub-data is picture information, the data element is a domain name in the picture information, and the remaining data is a storage path in the picture information.
4. The method of claim 3, wherein the target data is gift data, and the preset field includes at least a gift basic information field and a gift special effect information field.
5. A processing device for data in a live broadcast room, comprising:
the target data acquisition module is used for acquiring target data stored in a live broadcasting room in a preset data structure, wherein the target data comprises at least two target sub-data of the same type, each target sub-data comprises the same data element, the preset data structure comprises a sharing field and a target sub-data field, the sharing field is used for storing the data elements, and the target sub-data field is used for storing the rest data except the data elements in the target sub-data; the target data are data which need to be processed in the live broadcasting room client; the target data are gift data, prop data or bullet screen data;
the data processing module is used for analyzing the target data to obtain each target sub-data for data flow in the live broadcasting room;
the parsing the target data to obtain each target sub-data includes: analyzing the target data, generating each target sub-data, and storing each target sub-data into a corresponding target sub-data field to cover the residual data in each target sub-data field;
the data processing module comprises:
the data analysis sub-module is used for analyzing the target data to obtain data elements and each piece of residual data;
the data processing sub-module is used for generating each target sub-data according to the data elements and each residual data, storing each target sub-data into a corresponding target sub-data field, covering the residual data in each target sub-data field, and finishing the processing of the target data;
the data analysis submodule is specifically configured to:
analyzing the target data to convert the target data into a target object of a JavaBean type, traversing a data list contained in the target object, and obtaining each field value and each sub-data object in the data list, wherein the sub-data object is of the JavaBean type;
determining data elements from the field values according to the shared field and the field corresponding to each field value;
if the field corresponding to the sub data object is consistent with the preset field, accessing the target sub data field through the sub data object to obtain residual data corresponding to the target sub data field, wherein the data segment corresponding to the preset field contains the target sub data field;
the data analysis submodule is specifically configured to:
if the preset field is a field corresponding to a sub-data object with a key value pair collection structure, calling an element traversing function through the sub-data object to obtain each key value pair object contained in the sub-data object;
calling a value information acquisition function through a key value pair object to obtain a target sub-data list object contained in the key value pair object;
traversing the target sub-data list object to obtain each residual data corresponding to the sub-data object.
6. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of processing data in a live room as claimed in any one of claims 1-4.
7. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements a method of processing data in a live room as claimed in any one of claims 1-4.
CN201910866699.2A 2019-09-12 2019-09-12 Processing method, device, equipment and storage medium for data in live broadcasting room Active CN112492353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910866699.2A CN112492353B (en) 2019-09-12 2019-09-12 Processing method, device, equipment and storage medium for data in live broadcasting room

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910866699.2A CN112492353B (en) 2019-09-12 2019-09-12 Processing method, device, equipment and storage medium for data in live broadcasting room

Publications (2)

Publication Number Publication Date
CN112492353A CN112492353A (en) 2021-03-12
CN112492353B true CN112492353B (en) 2023-06-23

Family

ID=74920957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910866699.2A Active CN112492353B (en) 2019-09-12 2019-09-12 Processing method, device, equipment and storage medium for data in live broadcasting room

Country Status (1)

Country Link
CN (1) CN112492353B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2465098A1 (en) * 2001-11-21 2003-06-05 International Business Machines Corporation Enhancing resource adapters to facilitate communication in a distributed computer network
EP1676387A2 (en) * 2003-10-23 2006-07-05 Microsoft Corporation Schema hierarchy for electronic messages
CN107404515A (en) * 2017-06-21 2017-11-28 武汉斗鱼网络科技有限公司 The processing method and processing device of asynchronous http request
CN108304545A (en) * 2018-01-31 2018-07-20 杭州迪普科技股份有限公司 A kind of URL log storing methods and device
CN108694041A (en) * 2017-03-06 2018-10-23 武汉斗鱼网络科技有限公司 Data transfer device, device and service terminal
CN109359250A (en) * 2018-08-31 2019-02-19 阿里巴巴集团控股有限公司 Uniform resource locator processing method, device, server and readable storage medium storing program for executing
CN109617708A (en) * 2018-10-31 2019-04-12 浙江口碑网络技术有限公司 A kind of compression method burying a log, equipment and system
CN110096379A (en) * 2019-04-30 2019-08-06 武汉斗鱼鱼乐网络科技有限公司 Message distributing method, device, equipment and storage medium based on puppy parc
CN110188160A (en) * 2019-05-31 2019-08-30 联想(北京)有限公司 Date storage method and method for reading data

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2465098A1 (en) * 2001-11-21 2003-06-05 International Business Machines Corporation Enhancing resource adapters to facilitate communication in a distributed computer network
EP1676387A2 (en) * 2003-10-23 2006-07-05 Microsoft Corporation Schema hierarchy for electronic messages
CN108694041A (en) * 2017-03-06 2018-10-23 武汉斗鱼网络科技有限公司 Data transfer device, device and service terminal
CN107404515A (en) * 2017-06-21 2017-11-28 武汉斗鱼网络科技有限公司 The processing method and processing device of asynchronous http request
CN108304545A (en) * 2018-01-31 2018-07-20 杭州迪普科技股份有限公司 A kind of URL log storing methods and device
CN109359250A (en) * 2018-08-31 2019-02-19 阿里巴巴集团控股有限公司 Uniform resource locator processing method, device, server and readable storage medium storing program for executing
CN109617708A (en) * 2018-10-31 2019-04-12 浙江口碑网络技术有限公司 A kind of compression method burying a log, equipment and system
CN110096379A (en) * 2019-04-30 2019-08-06 武汉斗鱼鱼乐网络科技有限公司 Message distributing method, device, equipment and storage medium based on puppy parc
CN110188160A (en) * 2019-05-31 2019-08-30 联想(北京)有限公司 Date storage method and method for reading data

Also Published As

Publication number Publication date
CN112492353A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US10452765B2 (en) Web content rewriting, including responses
CN107861713B (en) Data calling method and device and computer readable storage medium
US10754628B2 (en) Extracting web API endpoint data from source code to identify potential security threats
US8499099B1 (en) Converting data into addresses
CN109815261B (en) Global search function implementation and data real-time synchronization method and device and electronic equipment
CN106407201B (en) Data processing method and device and computer readable storage medium
CN110727417B (en) Data processing method and device
CN106021421B (en) method and device for accelerating webpage rendering
CN109614569A (en) Page rendering method, apparatus and intelligent terminal
CN111625782B (en) Access authority control method and device for source code, computer equipment and storage medium
US20160103858A1 (en) Data management system comprising a trie data structure, integrated circuits and methods therefor
CN106126693A (en) The sending method of the related data of a kind of webpage and device
US20150212865A1 (en) Apparatus and method for providing virtual api for mashup service
CN113204345A (en) Page generation method and device, electronic equipment and storage medium
CN112084179A (en) Data processing method, device, equipment and storage medium
CN114268538A (en) Configuration method and device of front-end route
US20130339393A1 (en) Dynamic map template discovery and map creation
US9722967B2 (en) Exposing file metadata as LDAP attributes
CN110554877A (en) JSON data analysis method, device, equipment and storage medium
US20200110584A1 (en) Automated code generation for functional testing of software applications
CN104143110A (en) Two-dimensional code generating method with web site information
CN112492353B (en) Processing method, device, equipment and storage medium for data in live broadcasting room
CN103914479A (en) Resource request matching method and device
CN109635175B (en) Page data splicing method and device, readable storage medium and electronic equipment
CN113779311A (en) Data processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230602

Address after: Room 801, Floor 8, Block A, No. 611, Dongguan Road, Puyan Street, Binjiang District, Hangzhou City, Zhejiang Province, 310000

Applicant after: Hangzhou Shancao Interactive Entertainment Technology Co.,Ltd.

Address before: 1-1-505-1, Xindu building, southwest of the intersection of Weijin road and wandezhuang street, Nankai District, Tianjin

Applicant before: HUIJIAWANG (TIANJIN) TECHNOLOGY CO.,LTD.

Effective date of registration: 20230602

Address after: 1-1-505-1, Xindu building, southwest of the intersection of Weijin road and wandezhuang street, Nankai District, Tianjin

Applicant after: HUIJIAWANG (TIANJIN) TECHNOLOGY CO.,LTD.

Address before: 430070 room 007, A301, third floor, building B1, software industry phase 4.1, No. 1, Software Park East Road, Donghu New Technology Development Zone, Wuhan City, Hubei Province (Wuhan area of free trade zone)

Applicant before: WUHAN DOUYU YULE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant