CN111355983B - Service data processing method, device, server and storage medium - Google Patents

Service data processing method, device, server and storage medium Download PDF

Info

Publication number
CN111355983B
CN111355983B CN201811575309.8A CN201811575309A CN111355983B CN 111355983 B CN111355983 B CN 111355983B CN 201811575309 A CN201811575309 A CN 201811575309A CN 111355983 B CN111355983 B CN 111355983B
Authority
CN
China
Prior art keywords
service data
rpc
service
tree
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811575309.8A
Other languages
Chinese (zh)
Other versions
CN111355983A (en
Inventor
苏赞文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201811575309.8A priority Critical patent/CN111355983B/en
Publication of CN111355983A publication Critical patent/CN111355983A/en
Application granted granted Critical
Publication of CN111355983B publication Critical patent/CN111355983B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/241Operating system [OS] processes, e.g. server setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/251Learning process for intelligent management, e.g. learning user preferences for recommending movies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25891Management of end-user data being end-user preferences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Computer Graphics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure provides a service data processing method, device, server and storage medium, wherein the method comprises: responding to a received service data request sent by a client, and determining a service scene corresponding to service data requested by the service data request; acquiring a service data Identifier (ID) in the service scene; generating a Remote Procedure Call (RPC) tree corresponding to the service scenario; the RPC tree comprises at least one hierarchy, each hierarchy comprising at least one RPC; obtaining the service data based on the service data ID and the RPC tree; and returning the service data to enable the service data to be presented on the interface of the client.

Description

Service data processing method, device, server and storage medium
Technical Field
The present disclosure relates to data processing technologies, and in particular, to a method and an apparatus for processing service data, a server, and a storage medium.
Background
In the related art, various information of a video presented on a page of a video client is realized by calling a series of Remote Procedure Call (RPC) interfaces in a serial manner through a model (model) in a background server, however, when the number of video clients is large, resource consumption of a background is large, so that a data request is delayed obviously, and user experience is low.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a method and an apparatus for processing service data, a server, and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a method for processing service data, where the method includes:
responding to a received service data request sent by a client, and determining a service scene corresponding to service data requested by the service data request;
acquiring a service data Identifier (ID, Identifier) in the service scene;
generating an RPC tree corresponding to the service scene; the RPC tree comprises at least one hierarchy, each hierarchy comprising at least one RPC;
obtaining the service data based on the service data ID and the RPC tree;
and returning the service data to enable the service data to be presented on the interface of the client.
In the foregoing solution, the generating the RPC tree corresponding to the service scenario includes:
acquiring an RPC grade corresponding to the service scene;
determining the level of the RPC tree corresponding to the RPC level;
and generating the RPC tree corresponding to the hierarchy.
In the above scheme, the method further comprises:
and responding to the fact that the number of the service data IDs is multiple, and filtering the multiple service data IDs based on a preset filtering rule.
In the above scheme, obtaining the service data based on the service data ID and the RPC tree includes:
based on the service data ID, sequentially calling RPC included in each level according to the level of the RPC tree to obtain the service data corresponding to the service data ID;
wherein RPC of the same hierarchy is called in parallel.
In the foregoing solution, the acquiring the service data ID in the service scenario includes:
analyzing the service data request to obtain user key information;
determining the type of service data adaptive to the user key information;
and acquiring a service data ID corresponding to the service data type in the service scene.
In the above scheme, the method further comprises:
and responding to the type of the service Data as a Data Transfer Object (DTO), and performing Data mapping on the service Data to obtain the service Data in a JS Object Notation (JSON) format.
In a second aspect, an embodiment of the present disclosure further provides a service data processing apparatus, where the apparatus includes:
the interface module is used for responding to a received service data request sent by a client and determining a service scene corresponding to service data requested by the service data request;
and acquiring a service data ID in the service scene;
the packing module is used for generating an RPC tree corresponding to the service scene; the RPC tree comprises at least one hierarchy, each hierarchy comprising at least one RPC;
and obtaining the service data based on the service data ID and the RPC tree;
and returning the service data to enable the service data to be presented on the interface of the client.
In the above scheme, the packing module includes:
the loading unit is used for acquiring the RPC grade corresponding to the service scene;
determining the level of the RPC tree corresponding to the RPC level;
and generating the RPC tree corresponding to the hierarchy.
In the above scheme, the packing module includes:
and the filtering unit is used for responding to the fact that the number of the service data IDs is multiple, and filtering the service data IDs based on a preset filtering rule.
In the above scheme, the packing module includes:
the compiling unit is used for sequentially calling RPC (remote procedure call) contained in each level according to the level of the RPC tree based on the service data ID to obtain the service data corresponding to the service data ID;
wherein RPC of the same hierarchy is called in parallel.
In the above solution, the interface module includes:
the acquisition unit is used for analyzing the service data request to obtain the key information of the user;
determining the type of service data adaptive to the user key information;
and acquiring a service data ID corresponding to the service data type in the service scene.
In the above solution, the interface module includes:
and the mapping unit is used for responding to the DTO type of the service data and performing data mapping on the service data to obtain the service data in the JSON format.
In a third aspect, an embodiment of the present disclosure further provides a server, including:
a memory for storing executable instructions;
and the processor is used for realizing the service data processing method provided by the embodiment of the disclosure when the executable instructions stored in the memory are executed.
In a fourth aspect, an embodiment of the present disclosure further provides a storage medium, where executable instructions are stored, and when the executable instructions are executed, the storage medium is configured to implement the service data processing method provided in the embodiment of the present disclosure.
The application of the above embodiment of the present disclosure has the following beneficial effects:
by applying the embodiment of the disclosure, after the background server receives the service data request sent by the client, the corresponding service data is obtained based on the service data ID and the RPC tree corresponding to the service scene, so that the return efficiency of the service data is improved, and the overall response delay of the server is reduced.
Drawings
Fig. 1 is a schematic architecture diagram of a service data processing system provided in an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a server according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart of a service data processing method according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a service data processing method according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a remote procedure call interface level provided by an embodiment of the present disclosure;
FIG. 6 is an alternative diagram of a remote procedure call interface tree provided by embodiments of the present disclosure;
fig. 7 is a schematic flowchart of a service data processing method according to an embodiment of the present disclosure;
fig. 8 is a schematic flowchart of a service data processing method according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a packaging module provided in the embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a service data processing apparatus according to an embodiment of the present disclosure.
Detailed Description
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of the present disclosure belong. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the disclosure.
The flowchart and block diagrams in the figures provided by the disclosed embodiments illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Referring to fig. 1, fig. 1 is an alternative architecture diagram of a service data processing system provided by the embodiment of the present disclosure, in order to support an exemplary application, a mobile terminal 10 (an exemplary mobile terminal 10-1 and a mobile terminal 10-2 are shown) is connected to a server 30 through a network 20, where the network 20 may be a wide area network or a local area network, or a combination of the two, and data transmission is implemented using a wireless link.
The mobile terminal 10 is provided with a short video client, the mobile terminal is based on the short video client, the user watches the short video based on the short video client, and the short video client is triggered to send a corresponding service data request to the server 30 to request the short video data for playing at the short video client.
Accordingly, the server 30 receives a service data request sent by the short video client, determines a service scene corresponding to the requested short video data (e.g., a short video play (feed) scene corresponding to a home page of the client and a short video publish List (Post List) scene of a client user), obtains a short video ID in the determined service scene, generates an RPC tree corresponding to the service scene, obtains video data corresponding to the short video ID according to the generated RPC tree, and returns the obtained video data to the mobile terminal 10.
The mobile terminal 10 is further configured to play the acquired short video data through the graphical interface 110 (the graphical interface 110-1 and the graphical interface 110-2 are exemplarily shown) based on the short video client.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a server implementing an embodiment of the present disclosure. In the embodiment of the present disclosure, the server shown in fig. 2 is only an example, and should not bring any limitation to the functions and the use range of the embodiment of the present disclosure.
As shown in fig. 2, the server may include a processing device (e.g., central processing unit, graphics processor, etc.) 210 that may perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 220 or a program loaded from a storage device 280 into a Random Access Memory (RAM) 230. In the RAM 230, various programs and data necessary for the operation of the server are also stored. The processing device 210, the ROM220, and the RAM 230 are connected to each other through a bus 240. An Input/Output (I/O) interface 250 is also connected to bus 240.
Generally, the following devices may be connected to I/O interface 250: input devices 260 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 270 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, or the like; storage devices 280 including, for example, magnetic tape, hard disk, etc.; and a communication device 290. The communication means 290 may allow the server to communicate with other devices wirelessly or by wire to exchange data. While fig. 2 illustrates a server having various devices, it is to be understood that not all illustrated devices are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described by the provided flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network through communication device 290, or installed from storage device 280, or installed from ROM 220. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 210.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the disclosed embodiments, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the disclosed embodiments, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the server; or may exist separately and not be assembled into a server.
The computer readable medium carries one or more programs, and when the one or more programs are executed by the server, the server executes the video file processing method provided by the embodiment of the disclosure.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) and a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The units and/or modules described in the embodiments of the present disclosure may be implemented by software or hardware.
As a hardware manner, the units and/or modules of the server implementing the embodiments of the present disclosure may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components, and are used to execute the method provided by the embodiments of the present disclosure.
Fig. 3 is a schematic flow diagram of a background server acquiring short video data based on a short video client of a mobile terminal in the related art, referring to fig. 3, the short video data is acquired through an Interface module (API) of the background server, the API is integrated with an Application scene module, a Pack service module, a data model (model) module and an Interface description language module, when the Application scene module receives an acquisition request of the short video data, the Application scene of the short video data to be acquired is determined, the data model module is called, the data model module serially calls an RPC, and then the Pack service module is called, and the Pack service module packages and transmits the acquired data to the short video client through a protocol (Protobuf IDL) of a data organization. According to the short video data acquisition mode, the coupling degree of a data model and an API (application program interface) is high, in practical application, each service line is frequently changed, so that the collaborative development efficiency is low, when a plurality of short video clients send short video data requests simultaneously, the resource consumption of a background server is high, the serial call of RPC (remote procedure call) causes obvious delay, and the user experience is low.
Fig. 4 is a schematic flow chart of a service data processing method provided in the embodiment of the present disclosure, and referring to fig. 4, the service data processing method in the embodiment of the present disclosure includes:
step 401: and responding to a received service data request sent by a client, and determining a service scene corresponding to service data requested by the service data request.
In practical applications, the client described herein may be a short video client disposed on the mobile terminal, and the user may perform short video watching or publishing and the like through the short video client, and of course, in other embodiments, the client may also be other multimedia application clients.
Taking the client as the short video client as an example, when a user watches the short video based on the short video client, the short video client is triggered to send a service data request to the backend server, the API of the backend server receives the service data request sent by the short video client, and parses the service data request to obtain service scene information corresponding to the requested service data, for example, a service scene obtained through parsing is a first service scene, which may be a short video playing (feed) scene corresponding to a home page of the short video client or a second service scene obtained through parsing, and the second service scene is a short video publishing List (Post List) scene of the client user.
Step 402: and acquiring a service data ID in the service scene.
In an embodiment, the API of the background server may obtain the service data ID in the determined service scenario by:
analyzing the service data request to obtain user key information; determining the type of service data adaptive to the user key information; and acquiring a service data ID corresponding to the service data type in the service scene. In practical applications, the user key information may include at least one of: user ID, user's interest level in different types of business data, author (i.e., publisher of business data) to which the user is interested, and the like.
Illustratively, the API of the background server parses the service data request to obtain the interest level information of the user for different short video types, and based on the obtained interest level information, obtains one or more (two or more) short video IDs that are of interest (have the highest interest level) to the user in the determined service scenario, e.g., obtains six short video IDs of interest to the user.
Step 403: and generating an RPC tree corresponding to the service scene.
In actual implementation, after the API of the background server obtains the service data ID, a packing module (Packer) of the background server is called, and the RPC tree generation and the corresponding service data acquisition are realized by the packing module of the background server.
In an embodiment, the packing module of the background server may generate the RPC tree corresponding to the service scenario by:
acquiring an RPC grade corresponding to the service scene; determining the level of the RPC tree corresponding to the RPC level; and generating the RPC tree corresponding to the hierarchy. The RPC tree includes at least one hierarchy, each hierarchy including at least one RPC.
Here, referring to fig. 5, fig. 5 is a schematic diagram of remote procedure call interface levels provided by the embodiment of the present disclosure, in an actual application, the remote procedure call interface (RPC) levels may include three levels, which are a first level (Full level), a second level (Normal level), and a third level (Lite level), respectively; different service scenarios correspond to different RPC levels, for example, for a first service scenario, the corresponding RPC level is a first level.
In practical implementation, each RPC level corresponds to different levels of RPC trees, see fig. 6, fig. 6 is an optional schematic diagram of the RPC tree provided in the embodiment of the present disclosure, for the first level (61 in fig. 6), the corresponding RPC tree includes three levels (L1, L2, L3), for the second level (62 in fig. 6), the corresponding RPC tree includes two levels (L1, L2), for the third level (63 in fig. 6), the corresponding RPC tree includes one level (L1), for example, for some scenes, only the play address of the short video is needed; therefore, the generated RPC tree corresponds to the RPC grade corresponding to the service scene, so that useless call of useless RPC is avoided, the processing time is saved, and the processing efficiency is improved; different RPCs are arranged in a tree form, so that RPCs in the same level are concurrent, namely RPCs in the same level are called in parallel, and thus, the overall response delay of a server is reduced, and service data requested by a client is returned to the client more quickly.
Specifically, in an embodiment, the packaging module of the background server may include a loading unit (Loader), the RPC level corresponding to the service scenario is determined by the loading unit, an RPC tree corresponding to the RPC level is generated, and the metadata corresponding to the service data ID is obtained based on the service data ID and the generated RPC tree.
Still taking the service data as the short video data as an example for explanation, if the determined scene is a short video playing (feed) scene corresponding to a home page of the short video client, the loading unit in the packing module determines that the corresponding RPC level is a Full level, so as to generate an RPC tree corresponding to the Full level, and obtain metadata (Material) corresponding to the short video ID based on the generated RPC tree. In practical applications, the RPCs included in the RPC tree may include: the content management system comprises a mixing and arranging service (Sati/Sort), Item source information (Item, such as video state, User ID and the like), User information (User, related information of short video publishers), short video playing addresses (SmartPlayer), challenges (Challenge) of current short video ID binding, and basic information (Counter, such as the number of praise users and the number of comments) corresponding to the current short video ID.
In an embodiment, the packaging module of the background server may further include a filtering unit (Filter), where at least one preset filtering rule is stored in the filtering unit, and when there are multiple service data IDs acquired by the API, the filtering unit filters the multiple service data IDs based on the preset filtering rule. For example, in practical applications, the preset filtering rule may be security filtering based on a security angle, for example, for the service data ID is a short video ID, the private state of a short video may be filtered, and if some short videos are set to be private (i.e., invisible to other users), the short video IDs set to be private state are filtered; in practical application, the preset filtering rule can also be image-text filtering, and if the service data corresponding to the service data ID contains the image-text which is not supported by the version of the video client currently sending the service data request, the service data ID is filtered; in practical applications, for the service data ID being a short video ID, the preset filtering rule may also be used to filter the short video status, for example, for auditing reasons, if some short videos are off shelf, the short video IDs are filtered.
Step 404: and obtaining the service data based on the service data ID and the RPC tree.
Here, in an embodiment, the packaging module of the backend server includes a compiling unit (Assembler), and the data is packaged and encapsulated according to a data compression protocol by the compiling unit.
Specifically, the compiling unit may obtain the service data requested by the client by:
the compiling unit calls RPCs included in each level in sequence according to the levels of the RPC tree based on the service data IDs to obtain the service data corresponding to the service data IDs; wherein RPC of the same hierarchy is called in parallel.
Here, in practical application, the service data obtained by the compiling unit is a data set (various fields integrated by an information interface presented by a client are referred to as a data set) in the service scene corresponding to the service data ID, and the data type of the data set is DTO.
Step 405: and returning the service data to enable the service data to be presented on the interface of the client.
In practical application, before the API returns the service data to the client, the DTO formed by packaging sent by the packaging module is received, and data mapping needs to be performed on the DTO to obtain the service data in the JSON format. Specifically, the data mapping made by the API is a data mapping from the thread IDL to the Protobuf IDL (enforcing the IDL contract spirit).
By applying the embodiment of the disclosure, the API in the related technology is reconstructed, the function of the API is simplified, the Pack service is independently deployed, and the overall stability of the API is improved; RPC exists in a tree form, the generated RPC tree corresponds to the RPC level corresponding to the service scene, useless call of the useless RPC is avoided, processing time is saved, processing efficiency is improved, and when the RPC call is carried out, RPC of the same level is called in parallel, so that the whole response delay of a server is reduced, service data requested by a client is returned to the client more quickly, and user experience is improved.
Next, a service data processing method provided by the embodiment of the present disclosure is described by taking a scenario in which a client is a short video client and a user performs short video playing based on the short video client as an example. Fig. 7 is a schematic flowchart of a service data processing method provided in the embodiment of the present disclosure, fig. 8 is another schematic flowchart of the service data processing method provided in the embodiment of the present disclosure, and is applied to a server, where the server includes an API module and a packing module for implementing the service data processing method provided in the embodiment of the present disclosure, and with reference to fig. 7 and fig. 8, the service data processing method provided in the embodiment of the present disclosure includes:
step 701: the API receives a short video data request sent by a short video client.
Here, in practical applications, the short video client sends a short video data request to the background server based on a user trigger to request the short video data to be played. feed is a form of data that continuously provides content to a user; is a resource aggregator consisting of multiple content providers, actively subscribing to message sources by users and providing content to users, a feed stream being an information outlet for information streams that are continuously updated and presented to users' content.
In practical applications, the short video data request may carry the following information: user key information, version information of the short video client, service scene information and the like.
Wherein, the user key information may include at least one of: user ID, user's interest level in different types of business data, author (i.e., publisher of business data) to which the user is interested, and the like.
Step 702: and the API determines a service scene corresponding to the service data requested by the service data request based on the short video data request.
In practical implementation, referring to fig. 8, the API includes a scene determining unit (Feed/PostList) configured to parse the service data request to obtain service scene information corresponding to the requested service data, for example, a short video playing (Feed) scene corresponding to a top page of a short video client is obtained through parsing, or a short video publishing List (PostList) scene of a user is obtained through parsing.
Step 703: and the API acquires a plurality of short video IDs in the service scene.
In actual implementation, referring to fig. 8, the API includes an obtaining unit (ID Fetcher) configured to parse the short video data request to obtain user key information; determining a short video type adapted to the user key information; and acquiring the short video ID corresponding to the short video type in the service scene.
Here, the short video type adapted to the key information of the user may be a short video type with the highest interest level of the user; in an embodiment, the number of the obtained short video IDs may be preset according to actual situations, such as obtaining six short video IDs in which the user is interested.
Step 704: and the packing module generates an RPC tree corresponding to the service scene.
Here, in practical applications, after acquiring the plurality of short video IDs, the API calls the packaging module to transmit the plurality of acquired short video IDs to the packaging module, and in an embodiment, the packaging module has a configuration as shown in fig. 9, and includes a downloader (loading unit), a filter (filtering unit), and a combiner (compiling unit).
Specifically, after the loading unit acquires the short video ID and corresponding service scene information, the initialization unit (lower) determines the RPC level corresponding to the service scene and the level of the RPC tree corresponding to the RPC level, the execution unit (executive) generates the RPC tree corresponding to the level, and then the data unit obtains corresponding metadata (Material) based on the generated RPC tree. For example, the service scene is a feed scene, the loading unit determines that the RPC level corresponding to the feed scene is a Full level, the RPC tree level corresponding to the Full level is 3 layers, and generates an RPC tree including the 3 layers of RPC. Wherein, the RPC that the RPC tree includes can include: the content management system comprises a mixing and arranging service (Sati/Sort), Item (Item) source information (Item, such as video state, User ID and the like), User information (User, related information of a short video publisher), a short video playing address (Sm artPlaylayer), a Challenge (Challenge) of current short video ID binding, and basic information (Counter) corresponding to the current short video ID (such as the number of praise users and the number of comments).
Here, the data obtained by the loading unit is metadata corresponding to the acquired short video ID.
Step 705: and the packaging module filters the short video IDs based on a preset filtering rule.
In practical implementation, referring to fig. 9, at least one preset filtering rule is stored in the filtering unit, and the filtering unit is used to filter the plurality of short video IDs. In practical application, the preset filtering rule may be security filtering (secure filter) based on a security angle, for example, for a service data ID being a short video ID, the private state of a short video may be filtered, and if some short videos are set with private (i.e., invisible to other users), the short video IDs with the private state set are filtered; in practical application, the preset filtering rule may also be image-text filtering (ImageFilter), and if the service data corresponding to the service data ID includes an image-text which is not supported by the version of the video client currently sending the service data request, the service data ID is filtered; in practical applications, for the service data ID being a short video ID, the preset filtering rule may also be a filtering (StatusFilter) of a short video status, for example, for auditing reasons, if some short videos are off shelf, the short video IDs are filtered.
Step 706: and the packaging module obtains DTO data corresponding to the short video ID based on the short video ID obtained after filtering and the RPC tree.
In actual implementation, the compiling unit sequentially calls the RPCs included in each level according to the levels of the RPC tree based on the short video ID to obtain a data set of the short video ID in the service scene, packages the data into DTO-type data according to a preset RPC packaging format (i.e., a packaging sequence, ordered, such as basic information (base) → maker) → state information (Status) → Statistics of data (Statistics) → video (video)) and transmits the DTO-type data to the API; wherein the R PCs of the same hierarchy are invoked in parallel.
Step 707: and the API maps the DTO data into short video data in a JSON format and sends the short video data in the JSON format to a short video client.
In practical implementation, the API further includes a mapping unit (JSON Builder) that performs data mapping from a first interface description language (thread IDL) to a second interface description language (Protobuf IDL) on the DTO data to obtain short video data in a data format that can be identified by the short video client, and returns the short video data to the short video client for presentation on an interface of the short video client.
Fig. 10 is a schematic diagram of a composition structure of a service data processing apparatus provided in the embodiment of the present disclosure, and referring to fig. 10, the service data processing apparatus provided in the embodiment of the present disclosure includes:
the interface module 11 is configured to determine, in response to receiving a service data request sent by a client, a service scenario corresponding to service data requested by the service data request;
and acquiring a service data ID in the service scene;
a packing module 12, configured to generate an RPC tree corresponding to the service scenario; the RPC tree comprises at least one hierarchy, each hierarchy comprising at least one RPC;
and obtaining the service data based on the service data ID and the RPC tree;
and returning the service data to enable the service data to be presented on the interface of the client.
In one embodiment, the packaging module comprises:
the loading unit is used for acquiring the RPC grade corresponding to the service scene;
determining the level of the RPC tree corresponding to the RPC level;
and generating the RPC tree corresponding to the hierarchy.
In one embodiment, the packaging module comprises:
and the filtering unit is used for responding to the fact that the number of the service data IDs is multiple, and filtering the service data IDs based on a preset filtering rule.
In one embodiment, the packaging module comprises:
the compiling unit is used for sequentially calling RPC (remote procedure call) contained in each level according to the level of the RPC tree based on the service data ID to obtain the service data corresponding to the service data ID;
wherein RPC of the same hierarchy is called in parallel.
In one embodiment, the interface module comprises:
the acquisition unit is used for analyzing the service data request to obtain the key information of the user;
determining the type of service data adaptive to the user key information;
and acquiring a service data identification ID corresponding to the service data type in the service scene.
In one embodiment, the interface module comprises:
and the mapping unit is used for responding to the fact that the type of the service data is a data transmission object DTO, performing data mapping on the service data, and obtaining the service data in the JS object numbered notation JSON format.
Here, it should be noted that: the above description related to the service data processing apparatus is similar to the above description of the service data processing method, and the description of the beneficial effects of the same method is omitted for brevity. For technical details not disclosed in the embodiments of video coding described in this disclosure, refer to the description of the embodiments of the method of the present invention.
The disclosed embodiment also provides a readable storage medium, which may include: various media that can store program codes, such as a removable Memory device, a Random Access Memory (RAM), a Read-Only Memory (ROM), a magnetic disk, and an optical disk. The readable storage medium stores executable instructions;
the executable instructions are used for realizing the business data processing method provided by the embodiment of the disclosure when being executed by the processor.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (14)

1. A method for processing service data, the method comprising:
responding to a received service data request sent by a client, and determining a service scene corresponding to service data requested by the service data request;
acquiring a service data ID in the service scene;
generating a Remote Procedure Call (RPC) tree corresponding to the service scene; the RPC tree comprises at least one hierarchy, each hierarchy comprising at least one RPC;
obtaining the service data based on the service data ID and the RPC tree;
and returning the service data to enable the service data to be presented on the interface of the client.
2. The method of claim 1, wherein the generating a Remote Procedure Call (RPC) tree corresponding to the traffic scenario comprises:
acquiring an RPC grade corresponding to the service scene;
determining the level of the RPC tree corresponding to the RPC level;
and generating the RPC tree corresponding to the hierarchy.
3. The method of claim 1, wherein the method further comprises:
and responding to the fact that the number of the service data IDs is multiple, and filtering the multiple service data IDs based on a preset filtering rule.
4. The method of claim 1, wherein obtaining the service data based on the service data ID and the RPC tree comprises:
based on the service data ID, sequentially calling RPC included in each level according to the level of the RPC tree to obtain the service data corresponding to the service data ID;
wherein RPC of the same hierarchy is called in parallel.
5. The method of claim 1, wherein the obtaining the service data ID in the service scenario comprises:
analyzing the service data request to obtain user key information;
determining the type of service data adaptive to the user key information;
and acquiring a service data ID corresponding to the service data type in the service scene.
6. The method of any of claims 1 to 5, further comprising:
and responding to the fact that the type of the service data is a Data Transmission Object (DTO), and performing data mapping on the service data to obtain the service data.
7. A service data processing apparatus, characterized in that the apparatus comprises:
the interface module is used for responding to a received service data request sent by a client and determining a service scene corresponding to service data requested by the service data request;
and acquiring a service data ID in the service scene;
the packing module is used for generating a Remote Procedure Call (RPC) tree corresponding to the service scene; the RP-C tree includes at least one level, each level including at least one RPC;
and obtaining the service data based on the service data ID and the RPC tree;
and returning the service data to enable the service data to be presented on the interface of the client.
8. The apparatus of claim 7, wherein the packaging module comprises:
the loading unit is used for acquiring the RPC grade corresponding to the service scene;
determining the level of the RPC tree corresponding to the RPC level;
and generating the RPC tree corresponding to the hierarchy.
9. The apparatus of claim 7, wherein the packaging module comprises:
and the filtering unit is used for responding to the fact that the number of the service data IDs is multiple, and filtering the service data IDs based on a preset filtering rule.
10. The apparatus of claim 7, wherein the packaging module comprises:
the compiling unit is used for sequentially calling RPC (remote procedure call) contained in each level according to the level of the RPC tree based on the service data ID to obtain the service data corresponding to the service data ID;
wherein RPC of the same hierarchy is called in parallel.
11. The apparatus of claim 7, wherein the interface module comprises:
the acquisition unit is used for analyzing the service data request to obtain the key information of the user;
determining the type of service data adaptive to the user key information;
and acquiring a service data ID corresponding to the service data type in the service scene.
12. The apparatus of any of claims 7 to 11, wherein the interface module comprises:
and the mapping unit is used for responding to the fact that the type of the service data is a Data Transmission Object (DTO), and performing data mapping on the service data to obtain the service data.
13. A server, comprising:
a memory for storing executable instructions;
a processor, configured to implement the business data processing method according to any one of claims 1 to 6 when executing the executable instructions stored in the memory.
14. A storage medium storing executable instructions for implementing the business data processing method of any one of claims 1 to 6 when executed.
CN201811575309.8A 2018-12-21 2018-12-21 Service data processing method, device, server and storage medium Active CN111355983B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811575309.8A CN111355983B (en) 2018-12-21 2018-12-21 Service data processing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811575309.8A CN111355983B (en) 2018-12-21 2018-12-21 Service data processing method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111355983A CN111355983A (en) 2020-06-30
CN111355983B true CN111355983B (en) 2022-03-18

Family

ID=71195386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811575309.8A Active CN111355983B (en) 2018-12-21 2018-12-21 Service data processing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111355983B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760987A (en) * 2021-02-04 2021-12-07 北京沃东天骏信息技术有限公司 Data processing method and data processing platform
CN112905259A (en) * 2021-02-05 2021-06-04 北京有竹居网络技术有限公司 Data processing method, device, equipment and storage medium
CN113392093A (en) * 2021-07-09 2021-09-14 中国建设银行股份有限公司 Service processing method and device, electronic equipment and computer readable medium
CN113778492B (en) * 2021-09-17 2023-11-10 中国移动通信集团陕西有限公司 Method, device, equipment and storage medium for issuing capability API
CN114519158B (en) * 2022-01-11 2022-11-25 北京中交兴路信息科技有限公司 Page display method and device, storage medium and terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105637510A (en) * 2013-10-16 2016-06-01 谷歌公司 Acceleration based on cached flows
CN106850698A (en) * 2017-04-06 2017-06-13 广东浪潮大数据研究有限公司 A kind of User space RPC agreement multithreading optimization methods and system
CN106998343A (en) * 2016-01-26 2017-08-01 阿里巴巴集团控股有限公司 A kind of remote procedure call processing method, apparatus and system
CN107294911A (en) * 2016-03-31 2017-10-24 华为技术有限公司 A kind of packet monitor method and device, RPC system, equipment
CN107832140A (en) * 2017-10-10 2018-03-23 武汉斗鱼网络科技有限公司 A kind of method, storage medium, electronic equipment and the system of RPC requests control

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8065690B2 (en) * 2005-12-01 2011-11-22 Cisco Technology, Inc. Method and system for event-based remote procedure call implementation in a distributed computing system
JP5635760B2 (en) * 2009-10-16 2014-12-03 キヤノン株式会社 Information processing system, information processing method, and computer program
US9092281B2 (en) * 2012-10-02 2015-07-28 Qualcomm Incorporated Fast remote procedure call
US20140130063A1 (en) * 2012-11-07 2014-05-08 Cloudcar, Inc. Systems and methods for low overhead remote procedure calls

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105637510A (en) * 2013-10-16 2016-06-01 谷歌公司 Acceleration based on cached flows
CN106998343A (en) * 2016-01-26 2017-08-01 阿里巴巴集团控股有限公司 A kind of remote procedure call processing method, apparatus and system
CN107294911A (en) * 2016-03-31 2017-10-24 华为技术有限公司 A kind of packet monitor method and device, RPC system, equipment
CN106850698A (en) * 2017-04-06 2017-06-13 广东浪潮大数据研究有限公司 A kind of User space RPC agreement multithreading optimization methods and system
CN107832140A (en) * 2017-10-10 2018-03-23 武汉斗鱼网络科技有限公司 A kind of method, storage medium, electronic equipment and the system of RPC requests control

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一个异构型分布式系统的远程过程调用的设计与实现;杨雅辉等;《计算机工程与应用》;19901127;35-42 *
远程过程调用的设计与实现;王吉阳等;《计算机工程与设计》;19910501(第02期);71-79 *

Also Published As

Publication number Publication date
CN111355983A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN111355983B (en) Service data processing method, device, server and storage medium
CN104683422B (en) Data transmission method and device
KR20200089252A (en) Content transaction agreement system and method
US20220174346A1 (en) Video playing method and apparatus
CN109521956B (en) Cloud storage method, device, equipment and storage medium based on block chain
CN110297944B (en) Distributed XML data processing method and system
US20170142454A1 (en) Third-party video pushing method and system
CN113794909A (en) Video streaming system, method, server, device, and storage medium
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
CN110263276B (en) Message distribution method, device, equipment and storage medium
CN109639819A (en) Document transmission method, client, server and system
CN104834649B (en) It can realize the smart machine and multiple-equipment team working method of more equipment collaborations
KR102565776B1 (en) Method and Apparatus for Cloud Service
AU2021246978B2 (en) Multi-level cache-mesh-system for multi-tenant serverless environments
US20230319325A1 (en) Information interaction method, apparatus and device
EP3113030A1 (en) Method for providing image data based on cloud streaming, apparatus and system therefor
CN112734545A (en) Block chain data sharing method, device and system
CN111382381B (en) User data sharing method and device, mobile terminal and storage medium
García et al. NUBOMEDIA: an elastic PaaS enabling the convergence of real-time and big data multimedia
CN110618772B (en) View adding method, device, equipment and storage medium
CN111984614A (en) Method, device and system for sharing files
CN112000496B (en) Access method and device of third-party information source API and implementation method thereof
CN111291254A (en) Information processing method and device
CN111831530A (en) Test method and device
CN110288309A (en) Data interactive method, device, system, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.