Data processing method, device, storage medium and equipment

文档序号:1815410 发布日期:2021-11-09 浏览:13次 中文

阅读说明:本技术 数据处理方法、装置、存储介质及设备 (Data processing method, device, storage medium and equipment ) 是由 董炎辉 于 2020-05-09 设计创作,主要内容包括:本申请实施例公开了一种数据处理方法、装置、设备以及存储介质,主要涉及存储技术,该方法包括:获取数据流对应的存储请求,该存储请求包括与所述数据流具有关联关系的至少两个用户请求数据;若至少两个用户请求数据的数据类型为时延数据类型,则根据存储请求获取至少两个用户请求数据分别对应的用户标识;根据用户标识对至少两个用户请求数据进行划分,得到至少两个请求数据片段;根据片段标识与主服务设备之间的映射关系,将至少两个请求数据片段分别存储至主服务设备集合中对应的主服务设备;该主服务集合中的主服务设备所存储的至少两个请求数据片段用于更新用户在线维护列表。通过本申请能够有效避免后台服务设备出现存储空间不足的问题。(The embodiment of the application discloses a data processing method, a device, equipment and a storage medium, which mainly relate to the storage technology, wherein the method comprises the following steps: acquiring a storage request corresponding to a data stream, wherein the storage request comprises at least two user request data which have an association relation with the data stream; if the data types of the at least two user request data are the time delay data types, user identifications corresponding to the at least two user request data are obtained according to the storage request; dividing at least two pieces of user request data according to user identifications to obtain at least two pieces of request data; respectively storing at least two request data fragments to corresponding main service equipment in a main service equipment set according to the mapping relation between the fragment identification and the main service equipment; at least two request data segments stored by the primary service devices in the primary service set are used to update the user online maintenance list. By the method and the device, the problem that the storage space of the background service equipment is insufficient can be effectively avoided.)

1. A data processing method, comprising:

acquiring a storage request corresponding to a data stream, wherein the storage request comprises at least two user request data which have an association relation with the data stream;

if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

storing the at least two request data fragments to corresponding main service equipment in a main service equipment set respectively according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

2. The method of claim 1, wherein the method further comprises:

acquiring candidate heartbeat data which are respectively sent by the at least two users at least two moments;

merging the candidate heartbeat data which are sent in the same time period in the at least two moments to obtain the heartbeat data of the at least two users;

determining the heartbeat data of the at least two users as the request data of the at least two users, wherein the data type of the heartbeat data of the at least two users is a time delay data type.

3. The method of claim 2, wherein the method further comprises:

synchronizing the request data segments stored by each main service device in the main service device set to the corresponding standby service devices respectively;

respectively reading request data segments from each standby service device according to a first time interval to obtain at least two request data segments;

determining the time when the heartbeat data are sent by the at least two users and the number of times of the heartbeat data sent in a unit time period according to the at least two request data segments;

determining a user in an online state in the at least two users by adopting the time of the transmitted heartbeat data and the number of times of the transmitted heartbeat data in the unit time period;

and updating the user online maintenance list by adopting the user in an online state in the at least two users.

4. The method of claim 1, wherein the user identifier is a user number, and the dividing the at least two pieces of user request data according to the user identifier to obtain at least two pieces of request data comprises:

acquiring the number of devices corresponding to the main service devices in the main service device set;

obtaining a remainder between the user number and the equipment number;

dividing the at least two user request data according to the remainder to obtain at least two request data fragments; one request data segment corresponds to one remainder, and the same request data segment comprises user request data with the same corresponding remainder.

5. The method of claim 1, wherein the method further comprises:

if the data types of the at least two user request data are real-time data types, acquiring position information corresponding to recording equipment for recording the data stream, and acquiring position information corresponding to main service equipment in the main service equipment set;

the main service equipment with the position information matched with the position information corresponding to the recording equipment in the main service equipment set is used as target main service equipment;

storing the at least two user request data into the target primary service device; the at least two user request data stored by the target main service device are used for generating user display data corresponding to the data stream.

6. The method of claim 5, wherein the at least two user request data are the user online maintenance list, the data type of the user online maintenance list is a real-time data type, the user online maintenance list comprises at least two users in online status and online points of the users in online status; the method further comprises the following steps:

synchronizing the user online maintenance list stored in the target main service device to a standby service device corresponding to the target main service device;

reading the user online maintenance list from the standby service equipment corresponding to the target main service equipment according to a second time interval;

screening the users with the online points larger than a point threshold value from the user online maintenance list as candidate users;

and determining the candidate users and the online points of the candidate users as user display data corresponding to the data stream.

7. The method of claim 6, wherein the method further comprises:

the user display data is locally cached;

receiving a display request of a target user in the user online maintenance list for the user display data;

reading the user display data from the local cache according to the display request, wherein the user display data comprises the candidate users and the online points of the candidate users;

sorting the candidate users according to the online scores of the candidate users;

and sending the sorted candidate users to a terminal corresponding to the target user so that the terminal displays the sorted candidate users.

8. The method of any one of claims 1-7, further comprising:

acquiring the service class to which the data stream belongs;

acquiring a candidate main service equipment set matched with the service class to which the data stream belongs;

determining the candidate set of primary serving devices as a set of primary serving devices for storing the at least two user request data.

9. The method of claim 1, wherein the method further comprises:

acquiring a migration request for migrating the live broadcast service of a first live broadcast platform to a second live broadcast platform;

migrating the at least two request data fragments stored by the main service equipment in the main service equipment set to migration main service equipment in a migration main service equipment set according to the migration request; the main service equipment set belongs to the first live broadcast platform, and the migration main service equipment set belongs to the second live broadcast platform;

and if the at least two request data segments are successfully migrated, storing the user request data to be stored, which belong to the first direct broadcasting platform, to the migration master service device in the migration master service device set.

10. The method of claim 9, wherein the method further comprises:

acquiring the similarity between the at least two request data fragments stored by the main service equipment in the main service equipment set and the similarity between the at least two request data fragments obtained by migration in the migration main service equipment;

if the similarity is greater than a similarity threshold, determining that the at least two request data fragments are successfully migrated, and deleting the at least two request data fragments from the primary service equipment in the primary service equipment set.

11. The method of claim 9, wherein a data format corresponding to the first live platform is different from a data format corresponding to the second live platform;

the migrating the at least two request data fragments stored by the primary service device in the primary service device set to the migration primary service device in the primary service device set according to the migration request includes:

sending the at least two request data fragments stored by the main service equipment in the main service equipment set to intermediate service equipment according to the migration request, so that the intermediate service equipment performs format conversion on the at least two received request data fragments according to a data format corresponding to the second live broadcast platform;

receiving at least two request data fragments after format conversion sent by the intermediate service equipment;

and storing the at least two request data fragments after format conversion to the migration master service equipment in the migration master service equipment set.

12. A data processing apparatus, comprising:

the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a storage request corresponding to a data stream, and the storage request comprises at least two user request data which have an incidence relation with the data stream; if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

the dividing module is used for dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

the storage module is used for respectively storing the at least two request data fragments to corresponding main service equipment in a main service equipment set according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

13. A computer device, comprising: a processor and a memory;

wherein the memory is configured to store program code and the processor is configured to invoke the program code to perform the method of any of claims 1 to 11.

14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the steps of the method according to any one of claims 1 to 11.

Technical Field

The present application relates to the field of internet technologies, and in particular, to a data processing method, apparatus, storage medium, and device.

Background

With the development of internet technology, networks provide more intuitive and rapid channels for users to acquire information. For example, in a live webcast scenario, a publishing terminal transmits and publishes a data stream of a publisher while acquiring the data stream, so that a receiving terminal can play the data stream being acquired through the internet; the data stream may refer to voice, video, and images, among others. In the process of network live broadcast, background service equipment corresponding to a terminal needing to be published stores user request data, wherein the user request data comprise interaction data between audiences and publishers, requested online data of the audiences and the like; the existing method for storing the user request data easily causes the problem of insufficient storage space of background service equipment, thereby causing the user to drop line and influencing the user embodiment.

Disclosure of Invention

The technical problem to be solved by the embodiments of the present application is to provide a data processing method, an apparatus, a storage medium, and a device, which can effectively avoid the problem of insufficient storage space of a background service device.

An embodiment of the present application provides a data processing method, including:

acquiring a storage request corresponding to a data stream, wherein the storage request comprises at least two user request data which have an association relation with the data stream;

if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

storing the at least two request data fragments to corresponding main service equipment in a main service equipment set respectively according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

Optionally, the method further includes:

acquiring candidate heartbeat data which are respectively sent by the at least two users at least two moments;

merging the candidate heartbeat data which are sent in the same time period in the at least two moments to obtain the heartbeat data of the at least two users;

determining the heartbeat data of the at least two users as the request data of the at least two users, wherein the data type of the heartbeat data of the at least two users is a time delay data type.

Optionally, the method further includes:

synchronizing the request data segments stored by each main service device in the main service device set to the corresponding standby service devices respectively;

respectively reading request data segments from each standby service device according to a first time interval to obtain at least two request data segments;

determining the time when the heartbeat data are sent by the at least two users and the number of times of the heartbeat data sent in a unit time period according to the at least two request data segments;

determining a user in an online state in the at least two users by adopting the time of the transmitted heartbeat data and the number of times of the transmitted heartbeat data in the unit time period;

and updating the user online maintenance list by adopting the user in an online state in the at least two users.

Optionally, the user identifier is a user number, and the specific implementation manner of dividing the at least two pieces of user request data according to the user identifier to obtain the at least two pieces of request data includes:

acquiring the number of devices corresponding to the main service devices in the main service device set;

obtaining a remainder between the user number and the equipment number;

dividing the at least two user request data according to the remainder to obtain at least two request data fragments; one request data segment corresponds to one remainder, and the same request data segment comprises user request data with the same corresponding remainder.

Optionally, the method further includes:

if the data types of the at least two user request data are real-time data types, acquiring position information corresponding to recording equipment for recording the data stream, and acquiring position information corresponding to main service equipment in the main service equipment set;

the main service equipment with the position information matched with the position information corresponding to the recording equipment in the main service equipment set is used as target main service equipment;

storing the at least two user request data into the target primary service device; the at least two user request data stored by the target main service device are used for generating user display data corresponding to the data stream.

Optionally, the at least two user request data are the user online maintenance list, the data type of the user online maintenance list is a real-time data type, and the user online maintenance list includes at least two users in an online state and online points of the users in the online state; the method further comprises the following steps:

synchronizing the user online maintenance list stored in the target main service device to a standby service device corresponding to the target main service device;

reading the user online maintenance list from the standby service equipment corresponding to the target main service equipment according to a second time interval;

screening the users with the online points larger than a point threshold value from the user online maintenance list as candidate users;

and determining the candidate users and the online points of the candidate users as user display data corresponding to the data stream.

Optionally, the method further includes:

the user display data is locally cached;

receiving a display request of a target user in the user online maintenance list for the user display data;

reading the user display data from the local cache according to the display request, wherein the user display data comprises the candidate users and the online points of the candidate users;

sorting the candidate users according to the online scores of the candidate users;

and sending the sorted candidate users to a terminal corresponding to the target user so that the terminal displays the sorted candidate users.

Optionally, the method further includes:

acquiring the service class to which the data stream belongs;

acquiring a candidate main service equipment set matched with the service class to which the data stream belongs;

determining the candidate set of primary serving devices as a set of primary serving devices for storing the at least two user request data.

Optionally, the method further includes:

acquiring a migration request for migrating the live broadcast service of a first live broadcast platform to a second live broadcast platform;

migrating the at least two request data fragments stored by the main service equipment in the main service equipment set to migration main service equipment in a migration main service equipment set according to the migration request; the main service equipment set belongs to the first live broadcast platform, and the migration main service equipment set belongs to the second live broadcast platform;

and if the at least two request data segments are successfully migrated, storing the user request data to be stored, which belong to the first direct broadcasting platform, to the migration master service device in the migration master service device set.

Optionally, the method further includes:

acquiring the similarity between the at least two request data fragments stored by the main service equipment in the main service equipment set and the similarity between the at least two request data fragments obtained by migration in the migration main service equipment;

if the similarity is greater than a similarity threshold, determining that the at least two request data fragments are successfully migrated, and deleting the at least two request data fragments from the primary service equipment in the primary service equipment set.

Optionally, a data format corresponding to the first live broadcast platform is different from a data format corresponding to the second live broadcast platform;

the migrating the at least two request data fragments stored by the primary service device in the primary service device set to the migration primary service device in the primary service device set according to the migration request includes:

sending the at least two request data fragments stored by the main service equipment in the main service equipment set to intermediate service equipment according to the migration request, so that the intermediate service equipment performs format conversion on the at least two received request data fragments according to a data format corresponding to the second live broadcast platform;

receiving at least two request data fragments after format conversion sent by the intermediate service equipment;

and storing the at least two request data fragments after format conversion to the migration master service equipment in the migration master service equipment set.

An embodiment of the present application provides a data processing apparatus, including:

the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a storage request corresponding to a data stream, and the storage request comprises at least two user request data which have an incidence relation with the data stream; if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

the dividing module is used for dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

the storage module is used for respectively storing the at least two request data fragments to corresponding main service equipment in a main service equipment set according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

Optionally, the obtaining module is further configured to obtain candidate heartbeat data sent by the at least two users at least two moments respectively;

optionally, the apparatus further comprises: a merging module, configured to merge candidate heartbeat data sent within the same time period at the at least two moments to obtain heartbeat data of the at least two users;

and the determining module is used for determining the heartbeat data of the at least two users as the request data of the at least two users, and the data type of the heartbeat data of the at least two users is a time delay data type.

Optionally, the storage module is further configured to synchronize the request data segments stored by each primary service device in the primary service device set to the corresponding standby service devices respectively;

optionally, the apparatus further comprises: the reading module is used for respectively reading the request data segments from each standby service device according to a first time interval to obtain at least two request data segments;

optionally, the determining module is configured to determine, according to the at least two request data segments, time at which the heartbeat data is sent by the at least two users and the number of times of the heartbeat data sent in a unit time period; determining a user in an online state in the at least two users by adopting the time of the transmitted heartbeat data and the number of times of the transmitted heartbeat data in the unit time period;

optionally, the apparatus further comprises: and the updating module is used for updating the user online maintenance list by adopting the user in the online state in the at least two users.

Optionally, the user identifier is a user number, and the dividing module is configured to obtain a device number corresponding to a master service device in the master service device set; obtaining a remainder between the user number and the equipment number; dividing the at least two user request data according to the remainder to obtain at least two request data fragments; one request data segment corresponds to one remainder, and the same request data segment comprises user request data with the same corresponding remainder.

Optionally, the obtaining module is further configured to obtain, if the data type of the at least two user request data is a real-time data type, location information corresponding to a recording device for recording the data stream, and obtain location information corresponding to a main service device in the main service device set;

optionally, the determining module is configured to use a main service device in the main service device set, where the position information of the main service device set matches with the position information corresponding to the recording device, as a target main service device;

optionally, the storage module is further configured to store the at least two user request data into the target primary service device; the at least two user request data stored by the target main service device are used for generating user display data corresponding to the data stream.

Optionally, the at least two user request data are the user online maintenance list, the data type of the user online maintenance list is a real-time data type, and the user online maintenance list includes at least two users in an online state and online points of the users in the online state;

optionally, the storage module is further configured to synchronize the user online maintenance list stored in the target primary service device to a standby service device corresponding to the target primary service device;

optionally, the reading module is configured to read the user online maintenance list from the standby service device corresponding to the target primary service device according to a second time interval;

optionally, the determining module is configured to filter, from the user online maintenance list, users whose online points are greater than a point threshold, as candidate users; and determining the candidate users and the online points of the candidate users as user display data corresponding to the data stream.

Optionally, the storage module is further configured to locally cache the user display data;

the device further comprises: the receiving module is used for receiving a display request of a target user in the user online maintenance list for the user display data;

optionally, the reading module is configured to read the user presentation data from the local cache according to the presentation request, where the user presentation data includes the candidate user and the online points of the candidate user;

the device further comprises: the sending module is used for sequencing the candidate users according to the online scores of the candidate users; and sending the sorted candidate users to a terminal corresponding to the target user so that the terminal displays the sorted candidate users.

Optionally, the obtaining module is configured to obtain a service category to which the data stream belongs; acquiring a candidate main service equipment set matched with the service class to which the data stream belongs;

optionally, the determining module is configured to determine the candidate primary service device set as a primary service device set for storing the at least two user request data.

Optionally, the obtaining module is configured to obtain a migration request for migrating a live broadcast service of the first live broadcast platform to the second live broadcast platform;

the device further comprises: a migration module, configured to migrate, according to the migration request, the at least two request data fragments stored by the primary service device in the primary service device set to a migration primary service device in a migration primary service device set; the main service equipment set belongs to the first live broadcast platform, and the migration main service equipment set belongs to the second live broadcast platform;

optionally, the storage module is further configured to store, if the at least two request data segments are successfully migrated, the user request data to be stored that belongs to the first live platform to the migration master service device in the migration master service device set.

Optionally, the obtaining module is configured to obtain a similarity between the at least two request data segments stored by the primary service device in the primary service device set and the at least two request data segments obtained by migration in the migration primary service device;

optionally, the determining module is configured to determine that the at least two request data segments are successfully migrated if the similarity is greater than a similarity threshold, and delete the at least two request data segments from the primary service device in the primary service device set.

Optionally, a data format corresponding to the first live broadcast platform is different from a data format corresponding to the second live broadcast platform; the migration module is specifically configured to send the at least two request data segments stored by the primary service device in the primary service device set to an intermediate service device according to the migration request, so that the intermediate service device performs format conversion on the received at least two request data segments according to a data format corresponding to the second live broadcast platform; receiving at least two request data fragments after format conversion sent by the intermediate service equipment; and storing the at least two request data fragments after format conversion to the migration master service equipment in the migration master service equipment set.

One aspect of the present application provides a computer device, comprising: a processor and a memory;

wherein, the memory is used for storing computer programs, and the processor is used for calling the computer programs to execute the following steps:

acquiring a storage request corresponding to a data stream, wherein the storage request comprises at least two user request data which have an association relation with the data stream;

if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

storing the at least two request data fragments to corresponding main service equipment in a main service equipment set respectively according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

An aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored, where the computer program includes program instructions, and the program instructions, when executed by a processor, perform the following steps:

acquiring a storage request corresponding to a data stream, wherein the storage request comprises at least two user request data which have an association relation with the data stream;

if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

storing the at least two request data fragments to corresponding main service equipment in a main service equipment set respectively according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

In this application, the distribution service device may obtain a storage request corresponding to a data stream, where the storage request includes at least two user request data having an association relationship with the data stream, and if the data type of the at least two user request data is a delay data type, may obtain, according to the storage request, user identifiers corresponding to the at least two user request data, respectively. Furthermore, at least two pieces of user request data can be divided according to the user identification to obtain at least two pieces of request data, that is, the user request data with the same user identification belong to the same request data piece, so that the user request data corresponding to the same user can be stored in the same main service device, and the efficiency of reading the user request data can be improved. After the distribution service device obtains at least two request data fragments, the distribution service device may store the request data fragments to corresponding main service devices according to a mapping relationship between a fragment identifier of each request data fragment and the main service devices, that is, each request data fragment corresponds to one main service device. The method and the system have the advantages that at least two user request data do not need to be stored in the same main service device, the problem of insufficient storage space of the main service device can be avoided, online support of more users is facilitated, and user experience is improved. In addition, when the data type of the at least two user request data is the time delay data type, the at least two user request data are stored by adopting the distributed storage mode, so that the influence on the real-time performance of the data stream can be reduced.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1 is a block diagram illustrating an architecture of a data processing system provided herein;

FIG. 2a is an interaction diagram of a data processing system according to an embodiment of the present application;

FIG. 2b is an interaction diagram of a data processing system according to an embodiment of the present application;

FIG. 3 is a block diagram illustrating an exemplary architecture of various devices in a data processing system according to an embodiment of the present invention;

FIG. 4 is a schematic flow chart diagram of a data processing method provided herein;

FIG. 5 is a schematic diagram of a scenario for partitioning at least two user request data according to the present application;

FIG. 6 is a schematic diagram illustrating a scenario for updating a user online maintenance list according to the present application;

FIG. 7 is a schematic diagram of a scenario for storing at least two user request data provided by the present application;

FIG. 8 is a schematic diagram of a scenario for acquiring user presentation data according to the present application;

FIG. 9 is a schematic view of a scenario for returning ranked candidate users to a terminal according to the present application;

fig. 10 is a schematic view of a scenario for migrating a service of a first live platform to a second live platform according to the present application;

fig. 11 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;

fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

The application mainly relates to a Cloud storage technology in a Cloud technology, and the Cloud technology (Cloud technology) is a general term of a network technology, an information technology, an integration technology, a management platform technology, an application technology and the like based on Cloud computing business model application, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support; background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing. A distributed cloud storage system (hereinafter, referred to as a storage system) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or application interfaces to cooperatively work by using functions such as cluster application, grid technology, and a distributed storage file system, and provides a data storage function and a service access function to the outside. According to the method and the device, at least two user request data are stored in a plurality of main service devices (namely storage devices) in a distributed storage mode, the at least two user request data do not need to be stored in the same main service device, the problem that the storage space of the main service devices is insufficient can be avoided, more users can be supported online, and user experience is improved.

The data processing method of the present application is applicable to a data processing system including a distribution terminal 10, a master service apparatus set 20, a reception terminal 30, and a distribution service apparatus 40, as shown in fig. 1.

The distribution terminal 10 may refer to a terminal facing a data stream distributor, that is, the distribution terminal 10 may specifically refer to a terminal used by the distributor for recording and distributing a data stream. The data stream can be live data or non-live data, the live data can be data recorded and issued by a publisher in real time, namely, a receiver can check the data issued by the publisher in real time; the non-live data can be data recorded and released by a publisher in non-real time, namely the data is released after the publisher finishes recording; the data stream may specifically be text data, video data, voice data, image data, and the like, for example, when the data stream is live data, the data stream may specifically be a live event data stream, a live online education data stream, a live shopping data stream, a live conference data stream, and the like; when the data stream is text data, the data stream may specifically refer to user comment data (such as food comment data, travel comment data, and commodity comment data), user status data, a published document, and the like. The set of master service devices 20 may include at least two master service devices, respectively master service device 201, master service device 202, and so on. The main service device may be a service device of the content presentation platform, that is, may be used to store data streams, user request data, store user information of publishers and recipients, and the like. Content presentation platforms herein include forums, microblogs, posts, video application platforms, social application platforms, and the like. The receiving terminal may be a terminal facing a receiver, that is, the receiving terminal may specifically be a terminal used by the receiver to acquire a data stream, and one data stream may be acquired by at least two receiving terminals. That is, a receiving terminal can obtain (i.e., play or view) a certain data stream according to the operation of a user, and in the process of obtaining the data stream, the receiving terminal indicates that a receiver corresponding to the receiving terminal enters a content display platform corresponding to the data stream, and at this time, the receiver is in an online state; meanwhile, the receiving terminal can close the data stream according to the operation of the user, that is, the receiver corresponding to the receiving terminal exits from the content display platform corresponding to the data stream, and at this time, the receiver is in a dropped state.

The main service device may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The issuing terminal and the receiving terminal may be, but are not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the main service device may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.

The distribution service device 40 may be used to manage each master service device in the master service device set 20, for example, the distribution service device 40 may be used to allocate storage tasks for each master service device, and so on. The distribution service device 40 may be an independent service device, or may be a cluster device or a cloud computing center formed by a plurality of service devices.

Specifically, please refer to fig. 2a, and fig. 2a is an interaction diagram of a data processing system according to an embodiment of the present disclosure. As shown in fig. 2a, when the issuing terminal 10 sends a data stream to each receiving terminal, each receiving terminal may send user request data to the distribution service device 40, where the data type of the user request data may include a time delay data type and a real-time data type; the user request data of the time delay data type refers to data which does not need to be displayed in real time at a receiving terminal, and specifically comprises heartbeat data of a user, data of the user requesting to be online and the like; the user request data of the real-time data type may refer to data that needs to be displayed in real time at the receiving terminal, and may specifically include a user online maintenance list, interaction information between the receiver and the publisher, and the like. When the distribution service apparatus 40 receives at least two user request data having an association relationship with the data stream, a storage request for the at least two user request data may be generated; here, the at least two user request data having an association relationship with the data stream refer to: and acquiring user request data sent by a receiving terminal of the data stream. If the data type of the user request data is a time delay data type, user identifications corresponding to at least two user request data respectively can be obtained according to the storage request, namely the storage request can comprise the user identification corresponding to each user request data, and the user identification is used for indicating the corresponding user request data to be sent by a receiving terminal corresponding to which receiver; the user identifier may indicate an account number of a receiver logged in to the content presentation platform, or a terminal identifier of a receiving terminal corresponding to the receiver, where the terminal identifier may include an Internet Protocol Address (IP) of the receiving terminal, which refers to an Internet Protocol Address, a Media Access Control Address (MAC), a name of the receiving terminal, and the like.

Table 1:

fragment identification of requested data fragment Main service device
1 Master service device 201
2 Main service device 202
3 Master service device 203
…… ……

As shown in fig. 2b, after the distribution service device 40 obtains the user identifier, the at least two pieces of user request data may be divided according to the user identifier to obtain at least two pieces of request data; the method includes dividing user request data corresponding to the same user identifier into the same request data segment, wherein each request data segment at least comprises one user request data, each request data segment is respectively provided with different segment identifiers, and the segment identifiers can be composed of at least one of numerical values, letters, symbols and characters. After acquiring the segment identifier of each requested data segment, the distribution service device 40 may allocate, to each requested data segment, a main service device for storing the requested data segment according to the segment identifier; specifically, the distribution service device 40 may store the at least two request data into the corresponding main service devices in the main service device set according to the mapping relationship between the fragment identifier and the main service device; the at least two request data segments stored by the primary service devices in the primary service set are used to update the user online maintenance list. For example, the distribution service device 40 maintains the following table 1, where table 1 is used to indicate a mapping relationship between the fragment identifiers and the master service device, and it is assumed that at least two request data fragments include 3 request data fragments, which are request data fragment 1, request data fragment 2, and request data fragment 3, and the fragment identifiers of the 3 request data fragments are 1, 2, and 3, respectively. As in table 1, the fragment identifier 1 has a mapping relationship with the primary service apparatus 201, that is, the request data fragment 1 may be stored in the primary service apparatus 201; fragment identification 2 has a mapping relationship with the primary service device 202, that is, request data fragment 2 can be stored in the primary service device 202; the fragment identification 3 has a mapping relationship with the primary service device 203, i.e. the requested data fragment 3 can be stored in the primary service device 203.

In summary, when the data type of the at least two pieces of user request data associated with the data stream is a time delay data type, the at least two pieces of user request data are obtained by dividing the at least two pieces of user request data, and the at least two pieces of request data are respectively stored in the corresponding main service devices in the main service device set according to the mapping relationship between the segment identifiers corresponding to the pieces of request data and the main service devices. The distributed storage of the at least two user request data can be realized, and the problem that the storage space of the main service equipment is insufficient due to the fact that the at least two user request data are stored in the main service equipment can be avoided. That is, by storing at least two user request data in a distributed storage manner, user disconnection can be effectively avoided, and more users can be supported to be online.

Alternatively, as shown in fig. 3, the distribution service device 40 may be a background service device of the content presentation platform; the content presentation platform may refer to an application platform for publishing and acquiring multimedia data streams, and may specifically include a shopping application, a social application, a short video application, a web application, and the like. The distribution service device 10 may include an access module and a plurality of member management modules, where the access module is configured to pull a user online maintenance list, determine an online user and a dropped user, store the user online maintenance list in a database, and the like, where the user online maintenance list includes at least two online users; one member management module may correspond to one data stream, and the member management module is configured to update the user online maintenance list corresponding to the data stream, and store the heartbeat data of the user in the database. The database may refer to a storage module of the main service device in the main service device set, and may be used to store a user online maintenance list, user heartbeat data, and the like. Optionally, data associated with the data stream may be written to a primary service device in the primary service device set, then the data in the primary service device is synchronized to a standby service device, and then the data associated with the data stream may be read from the standby service device; therefore, read-write separation can be realized, the pressure for reading data from the main service equipment is reduced, and the online support of more users is facilitated.

Based on the above description, please refer to fig. 4, which is a flowchart illustrating a data processing method according to an embodiment of the present application. The method may be executed by a computer device, which may be referred to as the distribution service device 40 in fig. 1, and as shown in fig. 4, the data processing method may include:

s101, a storage request corresponding to a data stream is obtained, wherein the storage request comprises at least two user request data which are associated with the data stream.

The receiving terminal may send the user request data to the distribution service device in the process of acquiring the data stream issued by the content presentation platform. The data type of the user request data, which may carry the user identification of the recipient, here includes a time-lapse data type or a real-time data type, etc. After receiving the user request data, the distribution service device may generate a storage request corresponding to the data stream, where the storage request includes at least two user request data having an association relationship with the data stream.

And S102, if the data types of the at least two user request data are time delay data types, obtaining user identifications respectively corresponding to the at least two user request data according to the storage request.

The distribution service device can judge whether the at least two user request data are data which need to be displayed at the receiving terminal in real time, if so, the data types of the at least two user request data are determined to be real-time data types, and the at least two user request data can be stored in one main service device in the main service device set, so that the efficiency of reading the at least two user request data is improved. If not, determining that the data types of the at least two user request data are time delay data types, and acquiring user identifications respectively corresponding to the at least two user request data according to the storage request so as to store the at least two user request data by adopting a distributed storage method.

S103, dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identifier belong to the same request data segment, and each request data segment has different segment identifiers.

If all the user request data associated with the data stream are stored in one main service device, a single-machine performance bottleneck is easy to occur, that is, a problem of insufficient storage space of the main service device is easy to occur. Therefore, if the data type of the at least two user request data is the delay data type, the at least two user request data may be stored in a distributed storage manner, that is, the at least two user request data are stored in the at least two main service devices. First, the distribution service device may divide the at least two pieces of user request data according to the user identifier to obtain at least two pieces of request data. For example, the user identifier is a user number, and the distribution service device may divide the user request data corresponding to the user number within the first numerical range into a request data segment; and dividing the user request data corresponding to the user number in the second numerical range into one request data segment, and so on to obtain at least two request data segments, wherein the first numerical range and the second numerical range are different and are not overlapped with each other. For another example, the distribution service device may divide the user request data with the even user number into one request data segment; and dividing the user request data with the corresponding odd user number into one request data segment.

S104, storing the at least two request data fragments to corresponding main service equipment in a main service equipment set respectively according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used to update the user online maintenance list.

In order to store at least two request data fragments into different main service devices, the distribution service device may store each request data fragment into a corresponding main service device according to a mapping relationship between the fragment identifier and the main service device, that is, each request data fragment corresponds to one main service device. By respectively storing each request data fragment into the corresponding main service equipment, the problem that the storage space of the main service equipment is insufficient to cause user disconnection can be effectively avoided, and more users can be supported to be online.

In this application, the distribution service device may obtain a storage request corresponding to a data stream, where the storage request includes at least two user request data having an association relationship with the data stream, and if the data type of the at least two user request data is a delay data type, may obtain, according to the storage request, user identifiers corresponding to the at least two user request data, respectively. Furthermore, at least two pieces of user request data can be divided according to the user identification to obtain at least two pieces of request data, that is, the user request data with the same user identification belong to the same request data piece, so that the user request data corresponding to the same user can be stored in the same main service device, and the efficiency of reading the user request data can be improved. After the distribution service device obtains at least two request data fragments, the distribution service device may store the request data fragments to corresponding main service devices according to a mapping relationship between a fragment identifier of each request data fragment and the main service devices, that is, each request data fragment corresponds to one main service device. The method and the system have the advantages that at least two user request data do not need to be stored in the same main service device, the problem of insufficient storage space of the main service device can be avoided, online support of more users is facilitated, and user experience is improved. In addition, when the data type of the at least two user request data is the time delay data type, the at least two user request data are stored by adopting the distributed storage mode, so that the influence on the real-time performance of the data stream can be reduced.

In one embodiment, the user ID is a user number, and step S103 may include the following steps S11-S13.

And S11, acquiring the number of devices corresponding to the main service device in the main service device set.

And S12, acquiring the remainder between the user number and the number of the devices.

S13, dividing the at least two user request data according to the remainder to obtain at least two request data fragments; one request data segment corresponds to one remainder, and the same request data segment comprises user request data with the same corresponding remainder.

In steps s11 to s13, the distribution service device may obtain the number of devices corresponding to the primary service device in the primary service device set, obtain a remainder between the user number and the number of devices, and divide the user request data with the same corresponding remainder into the same request data segment. The method is beneficial to storing the request data of at least two users into at least two main service devices, and simultaneously is beneficial to storing the request data of the same user into the same main service device, so that the data reading efficiency can be improved; and the data quantity corresponding to the user request data stored in each main service device is the same or has little difference, which is beneficial to reducing the pressure of the main service device for storing data.

For example, as shown in fig. 5, it is assumed that one million users send user request data to the distribution service device, the user numbers of the user request data are 1 to 1000000, and the number of devices corresponding to the main service device in the main service device set is 3. The distribution service equipment can respectively obtain the remainder between the user number and the equipment number, wherein the remainder is 1 if the user number is 1, and the corresponding remainder is 1% 3 ═ 1 if the user number is 2, and the corresponding remainder is 2% 3 ═ 2 if the user number is 2; and by analogy, the remainder corresponding to all the user request data can be obtained. Further, the user request data with the same corresponding remainder can be divided into one request data segment, that is, the user request data with the corresponding remainder of 1 can be divided into request data segments, which are marked as request data segments 1, and the user request data with the corresponding remainder of 2 can be divided into request data segments, which are marked as request data segments 2; the user request data corresponding to remainder 0 may be divided into request data segments, labeled request data segment 3. Meanwhile, remainder 1 may be used as the segment id of request data segment 1, remainder 2 may be used as the segment id of request data segment 2, and remainder 0 may be used as the segment id of request data segment 3. Of course, other manners may be adopted to obtain the segment identifier of the requested data segment, for example, the segment identifier corresponding to the requested data segment is determined according to the online integral of the user in the requested data segment or the time for joining the content display platform corresponding to the data stream.

In one embodiment, step S101 is preceded by steps S21-S23.

And s21, obtaining candidate heartbeat data respectively sent by the at least two users at least two moments.

s22, merging the candidate heartbeat data sent in the same time period in the at least two moments to obtain the heartbeat data of the at least two users.

s23, determining the heartbeat data of the at least two users as the request data of the at least two users, wherein the data type of the heartbeat data of the at least two users is the time delay data type.

In steps s21 to s23, the distribution service apparatus may receive candidate heartbeat data respectively transmitted by the at least two users (i.e., receiving terminals) at least two time instants; and merging the candidate heartbeat data which are sent in the same time period in the at least two moments to obtain the heartbeat data of the at least two users. The heartbeat data of the user at a plurality of moments are merged, so that the frequency of writing data into the main service equipment is reduced, and the pressure of writing data into the main service equipment can be relieved. After acquiring heartbeat data of at least two users, determining the heartbeat data of the at least two users as request data of the at least two users; the method comprises the steps that whether a user is online or not can be determined according to heartbeat data of the user in a period of time, namely the heartbeat data of the user is not data which needs to be displayed in real time at a receiving terminal, and therefore the data types of the heartbeat data of at least two users are delay data types.

In this embodiment, the step S104 is followed by the following steps S31-S35.

s31, synchronizing the request data segments stored by each primary service device in the primary service device set to the corresponding standby service devices.

s32, reading the request data segments from the standby service devices respectively according to the first time interval, and obtaining at least two request data segments.

s33, determining the time of the heartbeat data sent by the at least two users and the number of times the heartbeat data is sent in the unit time period according to the at least two request data segments.

s34, determining the user of the at least two users who is online using the time of the transmitted heartbeat data and the number of times the heartbeat data was transmitted during the unit time period.

s35, updating the user online maintenance list with the user of the at least two users that is online.

In steps s31 to s35, in order to distribute the pressure of reading data from the primary service device, the distribution service device may read and write at least two request data fragments in a read-write separation manner, that is, the distribution service device may store the at least two request data fragments in the corresponding primary service device, and synchronize the request data fragments stored in the primary service device to the corresponding backup service device; when at least two request data fragments need to be read, at least two request data fragments can be read from the standby service device. Specifically, the distribution service device may synchronize the request data segments stored by each main service device in the main service device set to the corresponding standby service devices, respectively, and one main service device may correspond to one or more standby service devices. Further, the request data segments may be read from each of the standby service devices respectively according to a first time interval, to obtain at least two request data segments, where the first time interval may refer to 5s, 10s, or 15s, and the first time interval may be set by a developer of the content presentation platform, or set in another manner. After the distribution service device acquires the at least two request segments, the time when the heartbeat data are sent by the at least two users and the number of times of the heartbeat data sent in a unit time period can be determined according to the at least two request segments. If the number of times of the heartbeat data sent by the user in unit time is less than a time threshold value, or the time interval between the moment when the heartbeat data is sent by the user (recently) and the current moment is greater than a time interval threshold value, indicating that the user is in a disconnection state; if the number of times of the heartbeat data sent by the user in the unit time is larger than or equal to the number threshold value, or the time interval between the moment when the heartbeat data is sent by the user (recently) and the current moment is smaller than or equal to the time interval threshold value, the user is in the online state. Then, the distribution service device may update the user online maintenance list with the user in the online state, that is, only keep the user in the online state in the user online maintenance list, and remove the user in the offline state in the user online maintenance list. The user online maintenance list includes a plurality of users in online status, and each user in online status may be arranged in the user online maintenance list in sequence according to the size of the online credit or the size of the online time length, etc.

For example, as shown in fig. 6, main service apparatus 201 corresponds to standby apparatus 2011, main service apparatus 202 corresponds to standby apparatus 2022, and main service apparatus 203 corresponds to standby apparatus 2033. The distribution service apparatus can synchronize the request data segment 1 stored by the primary service apparatus 201 to the backup apparatus 2011, synchronize the request data segment 2 stored by the primary service apparatus 202 to the backup apparatus 2022, and synchronize the request data segment 3 stored by the primary service apparatus 203 to the backup apparatus 2033. The distribution service device may read the stored request data segments from the respective backup service devices according to the first time interval to obtain at least two request data segments, and determine, according to the at least two request data segments, a time when the user sends heartbeat data and a number of times that the user sends heartbeat data in a unit time (e.g., 1s or 5 s). Further, determining the users in the online state according to the time of the sent heartbeat data and the number of times of the sent heartbeat data, and updating the user online maintenance list by adopting the users in the online state.

Optionally, the user online maintenance list may be updated by a target main service device in the main service device set, where the target main service device may refer to a device in the main service device set for storing the user online maintenance list. Specifically, the distribution service device synchronizes request data segments stored by each main service device in the main service device set to corresponding standby service devices, and sends an update request for a user online list to a target main service device according to a first time interval; and the target main service device reads the request data fragments from each standby service device respectively to obtain at least two request data fragments. Then, the target main service device determines the time when the heartbeat data are sent by the at least two users and the number of times of the heartbeat data sent in a unit time period according to the at least two request data segments; determining a user in an online state in the at least two users by adopting the time of the transmitted heartbeat data and the number of times of the transmitted heartbeat data in the unit time period; and updating the user online maintenance list by adopting the user in the online state in the at least two users. The online user maintenance list is updated through the target main service device, so that the data processing pressure of the distribution service device can be reduced, and the real-time data processing can be ensured.

In one embodiment, steps S41-S43 may also be included after step S103.

And s41, acquiring the service class of the data stream.

And s42, acquiring a candidate main service device set matched with the service class to which the data flow belongs.

s43, determining the candidate set of primary serving devices as the set of primary serving devices for storing the at least two user request data.

In steps s 41-s 43, the data processing system may include a plurality of candidate sets of primary service devices corresponding to the traffic classes to which the data stream belongs, i.e., different sets of candidate primary service devices correspond to different traffic classes, where the traffic classes may include shopping classes, education classes, sporting events classes, conference classes, television programs classes, and so on. Therefore, the distribution service device may obtain a content presentation platform to which the data stream belongs, determine a business category to which the data stream belongs according to the content presentation platform, and if the content presentation platform is a shopping application program, determine that the business category to which the data stream belongs is the shopping category, or if the content presentation platform is an office application program, determine that the business category to which the data stream belongs is a conference category. After the distribution service device obtains the service class to which the data stream belongs, a candidate main service device set matched with the service class to which the data stream belongs can be obtained, and the candidate main service device set is determined as a main service device set used for storing the at least two user request data. By acquiring different main service equipment sets for the data streams of different service types, the data streams of different service types can be isolated, and the data processing efficiency is improved.

Table 2:

class of service Set of candidate primary service devices
Shopping category Set of candidate primary service devices 20
Education system Set of candidate primary service devices 21
Sporting events Set of candidate primary service devices 22
…… ……

For example, the distribution service device stores a mapping table between a candidate master service device set and a service class, where the mapping table is shown in table 2 below; table 2 includes three candidate primary service device sets, namely, a candidate primary service device set 20, a candidate primary service device set 21, and a candidate primary service device set 23. The three sets of candidate host service devices correspond to a shopping category, an education category, and a sporting event category, respectively. After obtaining the service class to which the data stream belongs, the distribution service device may query a candidate main service device set matched with the service class to which the data stream belongs according to table 2, and determine the candidate main service device set as a main service device set for storing the at least two user request data.

In one embodiment, the method may further include the following steps s 51-s 53.

s51, if the data type of the at least two user request data is a real-time data type, obtaining the location information corresponding to the recording device for recording the data stream, and obtaining the location information corresponding to the main service device in the main service device set.

s52, the main service device with the position information matched with the position information corresponding to the recording device in the main service device set is used as the target main service device.

s53, storing the at least two user request data in the target main service device; the at least two user request data stored by the target main service device are used for generating user display data corresponding to the data stream.

In steps s51 to s53, if the data type of the at least two user request data is a real-time data type, it indicates that the at least two user request data are data that needs to be displayed in real time at the receiving terminal, so that the location information corresponding to the recording device for recording the data stream can be obtained, and the location information corresponding to the main service device in the main service device set can be obtained. Further, the main service device whose position information matches the position information corresponding to the recording device in the main service device set may be used as the target main service device, and the main service device whose position information matches the position information corresponding to the recording device may refer to: and the main service equipment with the position information identical to that of the recording equipment in the main service equipment set, or the main service equipment with the minimum distance between the position in the main service equipment set and the position of the recording equipment. After the distribution service device acquires the target main service device, the at least two user request data can be stored in the target main service device, that is, the at least two user request data can be stored nearby, and the efficiency of reading the at least two user request data is improved. The at least two user request data stored by the target main service device are used for generating user presentation data corresponding to the data stream, where the user presentation data may refer to an online user with an online credit ahead, and an online duration, an online credit, and the like of the user.

For example, as shown in fig. 7, if the at least two user request data are of the real-time data type, the distribution service device may obtain location information corresponding to a recording device for recording the data stream, that is, obtain location information of the distribution terminal 10; and acquires the location information of the main service apparatus 201, the main service apparatus 202, and the main service apparatus 203, respectively. If the distance between the main service device 201 and the issuing terminal is determined to be the closest according to the position information of the main service device 201 and the position information of the issuing terminal 10, determining that the position information of the main service device 201 is matched with the position information of the issuing terminal 10, and taking the main service device 201 as a target main service device; storing the at least two user request data into the target primary service device.

In this embodiment, the at least two user request data are the user online maintenance list, the data type of the user online maintenance list is a real-time data type, and the user online maintenance list includes at least two users in an online state and online points of the users in the online state; the method may further include the following steps s 61-s 64.

s61, synchronizing the user online maintenance list stored in the target main service device to the standby service device corresponding to the target main service device.

s62, reading the user online maintenance list from the standby service device corresponding to the target main service device according to the second time interval.

And s63, screening the users with the online points larger than the point threshold value from the online maintenance list of the users as candidate users.

And s64, determining the candidate user and the online points of the candidate user as the user display data corresponding to the data stream.

In steps s61 to s64, in order to distribute the pressure of reading data from the target main service device, the distribution service device may read and write the user online maintenance list in a read-write separation manner, that is, the distribution service device may store the user online maintenance list in the target main service device, and synchronize the user online maintenance list stored in the target main service device with the corresponding standby service device; when the user online maintenance list needs to be read, the user online maintenance list can be read from the standby service equipment. Specifically, as shown in fig. 8, a target main service device corresponds to a standby service device 2011, and a distribution service device may synchronize the user online maintenance list stored by the target main service device to the standby service device 2011 corresponding to the target main service device. Further, the user online maintenance list is read from the standby service device 2011 corresponding to the target main service device according to the second time interval, that is, the user online maintenance list is periodically read from the standby service device 2011 corresponding to the target main service device according to the second time interval, so that the number of times of reading the user online maintenance list from the standby service device 2011 corresponding to the target main service device can be reduced, that is, the pressure of reading data from the standby device is reduced. After the distribution service equipment reads the user online maintenance list, screening the users with the online points larger than the point threshold value from the user online maintenance list as candidate users; and determining the candidate user and the online points of the candidate user as user display data corresponding to the data stream.

Optionally, the target primary service device and the corresponding standby service device may store the user online maintenance list by using a data structure of an ordered set (zset); the user online maintenance list may be expressed as follows:

key:prefix_room_member_{room_id}

data: < uid, score >

Table 3:

32bit 32bit
time stamp client-type

table 4:

in the above data structure, the room _ id indicates a number of a live broadcast room corresponding to the user online maintenance list, the user online maintenance list includes data of each user, that is, a user number (uid) of the user, and an online score (score), the online score may be determined according to a timestamp (time stamp) when a receiver joins the live broadcast room and a type (client-type) of a receiving terminal corresponding to the receiver in table 3, where the timestamp and the type of the receiving terminal may both be represented by 32 bits (bit).

Optionally, taking the content display platform as a live webcast platform as an example, that is, the content display platform is a live webcast room, the receiving terminal may enter or exit the live webcast room, may pull the user online maintenance list, and query the online users and the number of users in the live webcast room in the user online maintenance list. Specifically, as shown in table 4, as in table 4, when the user enters the live broadcast room, the receiving terminal may add the user to the user online maintenance list by executing a rediszadd command, and obtain heartbeat data of the user; or when the user exits the live broadcasting room, the user can exit the user online maintenance list by executing a redis zmem command, and the heartbeat data of the user is deleted. When a user pulls the user online maintenance list, a redisz range command can be executed to acquire N online users with the top online points in the user online maintenance list, and the redisz range command is cached for the users in front. The heartbeat data of the user may be updated by executing the rediszadd command, and the user online maintenance list may be updated based on the heartbeat data. The number of live room online users may be queried from a user online maintenance list by executing a redis zcore command. Optionally, table 4 further includes a time complexity for implementing each of the function points, where the time complexity is determined according to a time length for implementing the function point.

In one embodiment, the method may further include the following steps s 71-s 75.

s71, locally caching the user presentation data.

And s72, receiving a display request of a target user in the user online maintenance list for the user display data.

s73, reading the user presentation data from the local cache according to the presentation request, the user presentation data including the candidate user and the candidate user's online credit.

s74, ranking the candidate users according to their online scores.

s75, sending the sorted candidate users to the terminal corresponding to the target user, so that the terminal displays the sorted candidate users.

In steps s 71-s 75, as shown in fig. 9, the distribution service device may locally cache the user presentation data, receive a presentation request of a target user in the user online maintenance list for the user presentation data, that is, if a recipient pulls a user online list, the user presentation data may be read from the local cache according to the presentation request, where the user presentation data includes the candidate user and the online points of the candidate user. The online points may be determined according to behavior data of the online user, where the behavior data includes at least one of interaction times with the publisher, online time, time concerning the publisher, and the like. After the distribution service equipment acquires the user display data, the candidate users can be ranked according to the online points of the candidate users from high to low, or the candidate users can be ranked according to the online points of the candidate users from low to high; and sending the sorted candidate users to a terminal (namely, a receiving terminal 30) corresponding to the target user, so that the terminal displays the sorted candidate users. By caching the user display data in the local of the distribution service equipment, the efficiency of reading the user display data can be improved, and the user display data can be displayed in real time. After receiving the ranked candidate users, as shown in fig. 9, the receiving terminal 30 may display the ranked candidate users in the live interface 50, which is beneficial for the receiver to view the ranking in the live room corresponding to the data stream. The live interface can also include user information of the publisher, such as name, gender, head portrait and the like; the live interface can also comprise interactive information between the publisher and the receiving terminal.

In one embodiment, the method may further include the following steps s 81-s 83.

And s81, acquiring a migration request for migrating the live broadcast service of the first live broadcast platform to the second live broadcast platform.

s82, migrating the at least two request data fragments stored by the primary service device in the primary service device set to a migration primary service device in the migration primary service device set according to the migration request; the main service equipment set belongs to the first live broadcast platform, and the migration main service equipment set belongs to the second live broadcast platform.

s83, if the at least two request data fragments are migrated successfully, storing the user request data to be stored belonging to the first direct broadcast platform to the migration master service device in the migration master service device set.

In steps s81 to s83, the second live broadcast platform may be a live broadcast platform upgraded based on the first live broadcast platform, and a difference exists between service processing manners or architectures of the first live broadcast platform and the second live broadcast platform; when live broadcasting services of a first direct broadcasting platform need to be migrated to a second direct broadcasting platform, if the first direct broadcasting platform is directly stopped, normal operation of the services can be influenced; if the service of the first direct broadcast platform is migrated to the second direct broadcast platform at one time, a large wind exists. Therefore, the distribution service device can migrate the service of the first live broadcast platform to the second live broadcast platform in a gray scale mode, that is, the data writing service of the first live broadcast platform can be migrated to the second live broadcast platform first, and when it is determined that the second live broadcast platform has the data writing capability, the data reading service of the first live broadcast platform is migrated to the second live broadcast platform. For example, the distribution service device may obtain a migration request for migrating a live service of the first live platform to the second live platform, migrate the at least two request data segments stored by the primary service device in the primary service device set to the migration primary service device in the migration primary service device set according to the migration request, that is, verify whether the second live platform has a data writing capability by migrating the at least two request data segments to the migration primary service device. If the at least two request data segments are not successfully migrated, which indicates that the second live broadcast platform does not have the data writing capability, the second live broadcast platform needs to be repaired. If the at least two request data segments are successfully migrated, which indicates that the second live broadcast platform has a data writing capability, storing the user request data to be stored, which belongs to the first live broadcast platform, to the migration master service device in the migration master service device set, that is, migrating the data writing service of the first live broadcast platform to the second live broadcast platform. Further, when it is determined that the second live platform has a data reading capability, the distribution service device receives at least two request data segments read by the primary service devices in the primary service device set and at least two request data segments read by the migration primary service devices in the migration primary service device set. And if the similarity between the at least two request data segments read by the main service equipment and the at least two request data segments read by the migration main service equipment is greater than a similarity threshold value, determining that the second live broadcast platform has the data reading capability, and when a request for reading the user request data is received, reading the user request data from the second live broadcast platform according to the request, namely migrating the read data service of the first live broadcast platform to the second live broadcast platform.

In one embodiment, the method may further include the following steps s 91-s 92.

s91, obtaining the similarity between the at least two request data fragments stored by the primary service device in the primary service device set and the at least two request data fragments obtained by migration in the migration primary service device.

s92, if the similarity is greater than the similarity threshold, determining that the at least two request data fragments are successfully migrated, and deleting the at least two request data fragments from the primary service devices in the primary service device set.

In steps s91 to s92, the distribution service device may adopt a distance algorithm to obtain the distance between the at least two request data fragments stored by the primary service device in the primary service device set and the at least two request data fragments obtained by migration in the migration primary service device; here, the distance algorithm includes: euclidean distance algorithms, minkowski distance algorithms, manhattan distance algorithms, and chebyshev distance algorithms, among others. Further, determining the similarity between the at least two request data segments stored by the primary service device in the primary service device set and the at least two request data segments obtained by migration in the migration primary service device according to the distance. If the similarity is greater than the similarity threshold, it is indicated that the data written by the second live broadcast platform is the same as or similar to the data written by the first live broadcast platform, that is, the second live broadcast platform has a data writing capability, it is determined that the at least two request data segments are successfully migrated, and the at least two request data segments are deleted from the primary service device in the primary service device set. The similarity is smaller than or equal to a similarity threshold, which indicates that the difference between the data written by the second live broadcast platform and the data written by the first live broadcast platform is large, namely the second live broadcast platform does not have the data writing capability, and it is determined that the at least two request data segments are not successfully migrated.

Optionally, the data format corresponding to the first live broadcast platform is different from the data format corresponding to the second live broadcast platform; s82 may include steps s 111-s 113 as follows.

And s111, sending the at least two request data fragments stored by the primary service device in the primary service device set to an intermediate service device according to the migration request, so that the intermediate service device performs format conversion on the received at least two request data fragments according to a data format corresponding to the second live broadcast platform.

And s112, receiving at least two request data fragments after format conversion sent by the intermediate service equipment.

s113, storing the format-converted at least two request data fragments to the migration master service device in the migration master service device set.

In steps s111 to s113, as shown in fig. 10, the distribution service devices corresponding to the first live broadcast platform and the second live broadcast platform all have live broadcast access modules and member management modules, which can both implement corresponding functions; but the data formats supported by the modules in different live broadcast platforms are different. When the data format corresponding to the first live broadcast platform is different from the data format corresponding to the second live broadcast platform, format conversion can be performed on at least two request data fragments through the intermediate service equipment, so that data can be successfully written into the second live broadcast platform. Specifically, the distribution service device may send the at least two request data segments stored by the primary service device in the primary service device set to the intermediate service device according to the migration request, and the intermediate service device performs format conversion on the received at least two request data segments according to a data format corresponding to the second live broadcast platform. Further, at least two request data fragments after format conversion sent by the intermediate service device may be received, and the at least two request data fragments after format conversion are stored to the migration master service device in the migration master service device set. The first live broadcast platform and the second live broadcast platform can be compatible through the intermediate service equipment, and data in the first live broadcast platform can be successfully written into the second live broadcast platform.

Fig. 11 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. The data processing means may be a computer program (including program code) running on a computer device, for example, an application software; the apparatus may be used to perform the corresponding steps in the methods provided by the embodiments of the present application. As shown in fig. 11, the data processing apparatus may include: the device comprises an acquisition module 111, a dividing module 112, a storage module 113, a merging module 114, a determination module 115, a reading module 116, an updating module 117, a receiving module 118, a sending module 119 and a migration module 120.

An obtaining module 111, configured to obtain a storage request corresponding to a data stream, where the storage request includes at least two user request data having an association relationship with the data stream; if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

a dividing module 112, configured to divide the at least two pieces of user request data according to the user identifiers to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

a storage module 113, configured to store the at least two request data fragments to corresponding primary service devices in a primary service device set according to a mapping relationship between the fragment identifier and the primary service device; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

Optionally, the obtaining module 111 is further configured to obtain candidate heartbeat data sent by the at least two users at least two moments respectively;

optionally, the apparatus further comprises: a merging module 114, configured to merge candidate heartbeat data sent in the same time period at the at least two moments to obtain heartbeat data of the at least two users;

a determining module 115, configured to determine the heartbeat data of the at least two users as the request data of the at least two users, where a data type of the heartbeat data of the at least two users is a delay data type.

Optionally, the storage module 113 is further configured to synchronize the request data segments stored by each primary service device in the primary service device set to the corresponding standby service devices respectively;

optionally, the apparatus further comprises: a reading module 116, configured to read request data segments from the standby service devices respectively according to a first time interval, so as to obtain at least two request data segments;

optionally, the determining module 115 is configured to determine, according to the at least two request data segments, time when the heartbeat data is sent by the at least two users and the number of times of the heartbeat data sent in a unit time period; determining a user in an online state in the at least two users by adopting the time of the transmitted heartbeat data and the number of times of the transmitted heartbeat data in the unit time period;

optionally, the apparatus further comprises: an updating module 117, configured to update the user online maintenance list with a user in an online state of the at least two users.

Optionally, the user identifier is a user number, and the dividing module 112 is configured to obtain a device number corresponding to a main service device in the main service device set; obtaining a remainder between the user number and the equipment number; dividing the at least two user request data according to the remainder to obtain at least two request data fragments; one request data segment corresponds to one remainder, and the same request data segment comprises user request data with the same corresponding remainder.

Optionally, the obtaining module 111 is further configured to obtain, if the data type of the at least two user request data is a real-time data type, location information corresponding to a recording device for recording the data stream, and obtain location information corresponding to a main service device in the main service device set;

optionally, the determining module 115 is configured to use a main service device in the main service device set, where the position information of the main service device set matches with the position information corresponding to the recording device, as a target main service device;

optionally, the storage module 113 is further configured to store the at least two user request data into the target host service device; the at least two user request data stored by the target main service device are used for generating user display data corresponding to the data stream.

Optionally, the at least two user request data are the user online maintenance list, the data type of the user online maintenance list is a real-time data type, and the user online maintenance list includes at least two users in an online state and online points of the users in the online state;

optionally, the storage module 113 is further configured to synchronize the user online maintenance list stored in the target primary service device to a standby service device corresponding to the target primary service device;

optionally, the reading module 116 is configured to read the user online maintenance list from the standby service device corresponding to the target primary service device according to a second time interval;

optionally, the determining module 115 is configured to filter, from the user online maintenance list, users whose online points are greater than a point threshold value, as candidate users; and determining the candidate users and the online points of the candidate users as user display data corresponding to the data stream.

Optionally, the storage module 113 is further configured to locally cache the user display data;

the device further comprises: a receiving module 118, configured to receive a presentation request of a target user in the user online maintenance list for the user presentation data;

optionally, the reading module 116 is configured to read the user presentation data from the local cache according to the presentation request, where the user presentation data includes the candidate user and the online points of the candidate user;

the device further comprises: a sending module 119, configured to rank the candidate users according to their online scores; and sending the sorted candidate users to a terminal corresponding to the target user so that the terminal displays the sorted candidate users.

Optionally, the obtaining module 111 is configured to obtain a service class to which the data stream belongs; acquiring a candidate main service equipment set matched with the service class to which the data stream belongs;

optionally, the determining module 115 is configured to determine the candidate set of primary service devices as a set of primary service devices for storing the at least two user request data.

Optionally, the obtaining module 111 is configured to obtain a migration request for migrating a live broadcast service of a first live broadcast platform to a second live broadcast platform;

the device further comprises: a migration module 120, configured to migrate, according to the migration request, the at least two request data fragments stored by the primary service device in the primary service device set to a migration primary service device in a migration primary service device set; the main service equipment set belongs to the first live broadcast platform, and the migration main service equipment set belongs to the second live broadcast platform;

optionally, the storage module 113 is further configured to, if the at least two request data segments are successfully migrated, store the user request data to be stored, which belongs to the first direct broadcast platform, to the migration master service device in the migration master service device set.

Optionally, the obtaining module 111 is configured to obtain the similarity between the at least two request data segments stored by the primary service device in the primary service device set and the at least two request data segments obtained by migration in the migration primary service device;

optionally, the determining module 115 is configured to determine that the at least two request data segments are successfully migrated if the similarity is greater than a similarity threshold, and delete the at least two request data segments from the primary service device in the primary service device set.

Optionally, a data format corresponding to the first live broadcast platform is different from a data format corresponding to the second live broadcast platform; the migration module 120 is specifically configured to send the at least two request data segments stored by the primary service device in the primary service device set to an intermediate service device according to the migration request, so that the intermediate service device performs format conversion on the at least two received request data segments according to a data format corresponding to the second live broadcast platform; receiving at least two request data fragments after format conversion sent by the intermediate service equipment; and storing the at least two request data fragments after format conversion to the migration master service equipment in the migration master service equipment set.

According to an embodiment of the present application, the steps involved in the data processing method shown in fig. 4 may be performed by respective modules in the data processing apparatus shown in fig. 11. For example, steps S101 and S102 shown in fig. 4 may be performed by the acquisition module 11 in fig. 11, and step S103 shown in fig. 4 may be performed by the dividing module 112 in fig. 11; step S104 shown in fig. 4 may be performed by the storage module 113 in fig. 11.

According to an embodiment of the present application, each module in the data processing apparatus shown in fig. 8 may be respectively or entirely combined into one or several units to form the unit, or some unit(s) therein may be further split into multiple sub-units with smaller functions, which may implement the same operation without affecting implementation of technical effects of the embodiment of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of units, or the functions of a plurality of modules can be realized by one unit. In other embodiments of the present application, the data processing apparatus may also include other units, and in practical applications, the functions may also be implemented by being assisted by other units, and may be implemented by cooperation of a plurality of units.

According to an embodiment of the present application, the data processing apparatus as shown in fig. 11 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method as shown in fig. 4 on a general-purpose computer device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and implementing the data processing method of the embodiment of the present application. The computer program may be recorded on a computer-readable recording medium, for example, and loaded into and executed by the computing apparatus via the computer-readable recording medium.

In this application, the distribution service device may obtain a storage request corresponding to a data stream, where the storage request includes at least two user request data having an association relationship with the data stream, and if the data type of the at least two user request data is a delay data type, may obtain, according to the storage request, user identifiers corresponding to the at least two user request data, respectively. Furthermore, at least two pieces of user request data can be divided according to the user identification to obtain at least two pieces of request data, that is, the user request data with the same user identification belong to the same request data piece, so that the user request data corresponding to the same user can be stored in the same main service device, and the efficiency of reading the user request data can be improved. After the distribution service device obtains at least two request data fragments, the distribution service device may store the request data fragments to corresponding main service devices according to a mapping relationship between a fragment identifier of each request data fragment and the main service devices, that is, each request data fragment corresponds to one main service device. The method and the system have the advantages that at least two user request data do not need to be stored in the same main service device, the problem of insufficient storage space of the main service device can be avoided, online support of more users is facilitated, and user experience is improved. In addition, when the data type of the at least two user request data is the time delay data type, the at least two user request data are stored by adopting the distributed storage mode, so that the influence on the real-time performance of the data stream can be reduced.

Fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 12, the computer apparatus 1000 may include: the processor 1001, the network interface 1004, and the memory 1005, and the computer apparatus 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 12, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.

In the computer device 1000 shown in fig. 12, the network interface 1004 may provide a network communication function; the user interface 1003 is an interface for providing a user with input; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:

acquiring a storage request corresponding to a data stream, wherein the storage request comprises at least two user request data which have an association relation with the data stream;

if the data type of the at least two user request data is a time delay data type, acquiring user identifications corresponding to the at least two user request data respectively according to the storage request;

dividing the at least two pieces of user request data according to the user identification to obtain at least two pieces of request data; the user request data corresponding to the same user identification belong to the same request data segment, and each request data segment has different segment identifications;

storing the at least two request data fragments to corresponding main service equipment in a main service equipment set respectively according to the mapping relation between the fragment identification and the main service equipment; the at least two request data segments stored by the primary service devices in the primary service set are used for updating the user online maintenance list.

Optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

acquiring candidate heartbeat data which are respectively sent by the at least two users at least two moments;

merging the candidate heartbeat data which are sent in the same time period in the at least two moments to obtain the heartbeat data of the at least two users;

determining the heartbeat data of the at least two users as the request data of the at least two users, wherein the data type of the heartbeat data of the at least two users is a time delay data type.

Optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

synchronizing the request data segments stored by each main service device in the main service device set to the corresponding standby service devices respectively;

respectively reading request data segments from each standby service device according to a first time interval to obtain at least two request data segments;

determining the time when the heartbeat data are sent by the at least two users and the number of times of the heartbeat data sent in a unit time period according to the at least two request data segments;

determining a user in an online state in the at least two users by adopting the time of the transmitted heartbeat data and the number of times of the transmitted heartbeat data in the unit time period;

and updating the user online maintenance list by adopting the user in an online state in the at least two users.

Optionally, the user identifier is a user number, and the processor 1001 may be configured to call a device control application stored in the memory 1005, so as to implement:

acquiring the number of devices corresponding to the main service devices in the main service device set;

obtaining a remainder between the user number and the equipment number;

dividing the at least two user request data according to the remainder to obtain at least two request data fragments; one request data segment corresponds to one remainder, and the same request data segment comprises user request data with the same corresponding remainder.

Optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

if the data types of the at least two user request data are real-time data types, acquiring position information corresponding to recording equipment for recording the data stream, and acquiring position information corresponding to main service equipment in the main service equipment set;

the main service equipment with the position information matched with the position information corresponding to the recording equipment in the main service equipment set is used as target main service equipment;

storing the at least two user request data into the target primary service device; the at least two user request data stored by the target main service device are used for generating user display data corresponding to the data stream.

Optionally, the at least two user request data are the user online maintenance list, the data type of the user online maintenance list is a real-time data type, and the user online maintenance list includes at least two users in an online state and online points of the users in the online state; the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:

synchronizing the user online maintenance list stored in the target main service device to a standby service device corresponding to the target main service device;

reading the user online maintenance list from the standby service equipment corresponding to the target main service equipment according to a second time interval;

screening the users with the online points larger than a point threshold value from the user online maintenance list as candidate users;

and determining the candidate users and the online points of the candidate users as user display data corresponding to the data stream.

Optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

the user display data is locally cached;

receiving a display request of a target user in the user online maintenance list for the user display data;

reading the user display data from the local cache according to the display request, wherein the user display data comprises the candidate users and the online points of the candidate users;

sorting the candidate users according to the online scores of the candidate users;

and sending the sorted candidate users to a terminal corresponding to the target user so that the terminal displays the sorted candidate users.

Optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

acquiring the service class to which the data stream belongs;

acquiring a candidate main service equipment set matched with the service class to which the data stream belongs;

determining the candidate set of primary serving devices as a set of primary serving devices for storing the at least two user request data.

Optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

acquiring a migration request for migrating the live broadcast service of a first live broadcast platform to a second live broadcast platform;

migrating the at least two request data fragments stored by the main service equipment in the main service equipment set to migration main service equipment in a migration main service equipment set according to the migration request; the main service equipment set belongs to the first live broadcast platform, and the migration main service equipment set belongs to the second live broadcast platform;

and if the at least two request data segments are successfully migrated, storing the user request data to be stored, which belong to the first direct broadcasting platform, to the migration master service device in the migration master service device set.

Optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

acquiring the similarity between the at least two request data fragments stored by the main service equipment in the main service equipment set and the similarity between the at least two request data fragments obtained by migration in the migration main service equipment;

if the similarity is greater than a similarity threshold, determining that the at least two request data fragments are successfully migrated, and deleting the at least two request data fragments from the primary service equipment in the primary service equipment set.

Optionally, a data format corresponding to the first live broadcast platform is different from a data format corresponding to the second live broadcast platform;

optionally, the processor 1001 may be configured to invoke a device control application stored in the memory 1005 to implement:

sending the at least two request data fragments stored by the main service equipment in the main service equipment set to intermediate service equipment according to the migration request, so that the intermediate service equipment performs format conversion on the at least two received request data fragments according to a data format corresponding to the second live broadcast platform;

receiving at least two request data fragments after format conversion sent by the intermediate service equipment;

and storing the at least two request data fragments after format conversion to the migration master service equipment in the migration master service equipment set.

In this application, the distribution service device may obtain a storage request corresponding to a data stream, where the storage request includes at least two user request data having an association relationship with the data stream, and if the data type of the at least two user request data is a delay data type, may obtain, according to the storage request, user identifiers corresponding to the at least two user request data, respectively. Furthermore, at least two pieces of user request data can be divided according to the user identification to obtain at least two pieces of request data, that is, the user request data with the same user identification belong to the same request data piece, so that the user request data corresponding to the same user can be stored in the same main service device, and the efficiency of reading the user request data can be improved. After the distribution service device obtains at least two request data fragments, the distribution service device may store the request data fragments to corresponding main service devices according to a mapping relationship between a fragment identifier of each request data fragment and the main service devices, that is, each request data fragment corresponds to one main service device. The method and the system have the advantages that at least two user request data do not need to be stored in the same main service device, the problem of insufficient storage space of the main service device can be avoided, online support of more users is facilitated, and user experience is improved. In addition, when the data type of the at least two user request data is the time delay data type, the at least two user request data are stored by adopting the distributed storage mode, so that the influence on the real-time performance of the data stream can be reduced.

It should be understood that the computer device 1000 described in this embodiment of the present application may perform the description of the data processing method in the embodiment corresponding to fig. 4, and may also perform the description of the data processing apparatus in the embodiment corresponding to fig. 11, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.

Further, here, it is to be noted that: an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program executed by the aforementioned data processing apparatus, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the data processing method in the embodiment corresponding to fig. 4 can be performed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application.

By way of example, the program instructions described above may be executed on one computer device, or on multiple computer devices located at one site, or distributed across multiple sites and interconnected by a communication network, which may comprise a blockchain network.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

39页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:存储资源处理装置及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类