Movatterモバイル変換


[0]ホーム

URL:


CN112199090B - Information stream processing method, device and computer readable storage medium - Google Patents

Information stream processing method, device and computer readable storage medium
Download PDF

Info

Publication number
CN112199090B
CN112199090BCN201910610619.7ACN201910610619ACN112199090BCN 112199090 BCN112199090 BCN 112199090BCN 201910610619 ACN201910610619 ACN 201910610619ACN 112199090 BCN112199090 BCN 112199090B
Authority
CN
China
Prior art keywords
data
information
extensible
native
expandable
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
CN201910610619.7A
Other languages
Chinese (zh)
Other versions
CN112199090A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co LtdfiledCriticalTencent Technology Shenzhen Co Ltd
Priority to CN201910610619.7ApriorityCriticalpatent/CN112199090B/en
Publication of CN112199090ApublicationCriticalpatent/CN112199090A/en
Application grantedgrantedCritical
Publication of CN112199090BpublicationCriticalpatent/CN112199090B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The embodiment of the application provides an information flow processing method, an information flow processing device and a computer readable storage medium, wherein the method comprises the following steps: sending an information pulling request to a server so that the server obtains an information stream aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet; and receiving the information flow, and displaying the native data and the visual service data corresponding to the expandable code packet on a page according to the information flow. By adopting the embodiment of the application, the development cost can be reduced, and the display form of the information stream can be enriched.

Description

Information stream processing method, device and computer readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an information stream processing method, an information stream processing device, and a computer readable storage medium.
Background
Along with the development of data informatization, the data growth is rapid, and big data show a trend of diversification and dispersion. In the context of large-scale data, the construction of information streams containing up-to-date news information or content of interest to users has become a fundamental requirement for internet content providers.
In the prior art, the construction of the information stream can be realized by adopting a full native technology, and the information stream is hard-coded into an installation package of the client by using a native application programming interface on an operating system, so that the information stream is displayed in the client. The information flow constructed by the full native technology has strict requirements on the type of the information data and the display form of the information data, so that the display form of the information flow is single; when the information type is added in the information stream, the version of the client needs to be updated to display the information data contained in the information stream, so that development cost is increased.
Disclosure of Invention
The embodiment of the application provides an information stream processing method, an information stream processing device and a computer readable storage medium, which can reduce development cost and enrich the display form of information streams.
An aspect of the present application provides an information flow processing method, which is applied to a terminal device, and includes:
Sending an information pulling request to a server so that the server obtains an information stream aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet;
And receiving the information flow, and displaying the native data and the visual service data corresponding to the expandable code packet on a page according to the information flow.
Wherein the information stream includes a plurality of unit information data;
the receiving the information flow, displaying the native data and the visual service data corresponding to the expandable code packet on a page according to the information flow, and the method comprises the following steps:
receiving the information flow, and acquiring data type identifiers corresponding to each unit information data in the information flow;
If the data type identifier is a native identifier, determining that the unit information data is the native data, and displaying the native data based on a native framework;
And if the data type identifier is an extensible identifier, determining the unit information data as the extensible code packet, and displaying the visual service data corresponding to the extensible code packet based on an extensible framework and the original framework.
And if the data type identifier is a native identifier, determining that the unit information data is the native data and displaying the native data based on a native framework, wherein the method comprises the following steps:
if the data type identifier is a primary identifier, determining unit information data corresponding to the primary identifier as primary data;
Distributing the native data to a native framework, and acquiring an information display template from the native framework; the information display template is used for standardizing the display form of the original data;
and carrying out page typesetting on the original data based on the information display template, and displaying the original data after page typesetting on the page.
The displaying the visual service data corresponding to the expandable code packet based on the expandable frame and the native frame comprises the following steps:
Distributing the expandable code package to an expandable framework, and loading the expandable code package based on the expandable framework to obtain expandable service data corresponding to the expandable code package;
according to a communication mechanism between the extensible framework and the original framework, converting a data format of the extensible business data into a data format of the original data;
And rendering the format-converted extensible service data based on the original frame to obtain visual service data, and displaying the visual service data on a page.
The extensible code package comprises a page layout file, a logic script file and a style control file;
The distributing the expandable code package to an expandable framework, loading the expandable code package based on the expandable framework to obtain expandable service data corresponding to the expandable code package, including:
distributing the expandable code package into an expandable framework, and converting the page layout file into a layout script file based on a translation component in the expandable framework;
transmitting the layout script file to a script loading component based on the communication component in the extensible framework;
And analyzing the layout script file and the logic script file based on the script loading component, and generating the extensible business data corresponding to the extensible code package according to the analysis result and the style control file.
The receiving the information flow, displaying the native data and the visual service data corresponding to the expandable code packet on a page according to the information flow, and the method comprises the following steps:
acquiring the arrangement sequence of the native data and the extensible code packet in the information stream;
And displaying the visual service data corresponding to the native data and the extensible code packet on a page based on the arrangement sequence.
An aspect of the present application provides an information flow processing method, which is applied to a server, and includes:
Receiving an information pulling request sent by a terminal device, and acquiring an information stream aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet;
And sending the information stream to the terminal equipment so that the terminal equipment displays the native data and the visual service data corresponding to the extensible code packet.
Wherein the information stream further comprises a native identification extensible identification; the native identifier is used for representing a data type corresponding to the native data, and the extensible identifier is used for representing the data type corresponding to the extensible code packet.
Wherein the method further comprises:
Acquiring a code file sent by a third party device through a program programming interface, and packaging the code file into an extensible code packet; the code file is written by the third party device through an extensible coding platform provided by the programming interface.
An aspect of an embodiment of the present application provides an information flow processing apparatus, which is applied to a terminal device, including:
the first sending module is used for sending an information pulling request to the server so that the server can acquire an information flow aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet;
And the display module is used for receiving the information flow, and displaying the native data and the visual service data corresponding to the expandable code packet on a page according to the information flow.
Wherein the information stream includes a plurality of unit information data; the display module includes:
the type identifier acquisition unit is used for receiving the information flow and acquiring data type identifiers corresponding to each unit of information data in the information flow;
A native data determining unit configured to determine that the unit information data is the native data if the data type identifier is a native identifier, and display the native data based on a native frame;
and the extensible code packet determining unit is used for determining the unit information data as the extensible code packet if the data type identifier is an extensible identifier, and displaying the visual service data corresponding to the extensible code packet based on an extensible framework and the original framework.
Wherein the native data determination unit includes:
the judging subunit is used for determining the unit information data corresponding to the original identifier as original data if the data type identifier is the original identifier;
The first distribution subunit is used for distributing the native data into a native frame and acquiring an information display template from the native frame; the information display template is used for standardizing the display form of the original data;
and the typesetting subunit is used for typesetting the page of the original data based on the information display template and displaying the page typeset original data on the page.
Wherein the scalable code packet determining unit includes:
the second distributing subunit is used for distributing the expandable code package to an expandable framework, and loading the expandable code package based on the expandable framework to obtain expandable service data corresponding to the expandable code package;
a format conversion subunit, configured to convert, according to a communication mechanism between the expandable framework and the native framework, a data format to which the expandable service data belongs into a data format to which the native data belongs;
And the rendering subunit is used for rendering the format-converted extensible service data based on the original frame to obtain visual service data, and displaying the visual service data on a page.
The extensible code package comprises a page layout file, a logic script file and a style control file;
The second distribution subunit includes:
a conversion subunit, configured to distribute the extensible code package into an extensible framework, and convert the page layout file into a layout script file based on a translation component in the extensible framework;
A script transmitting subunit, configured to transmit the layout script file to a script loading component based on the communication component in the extensible framework;
And the analysis subunit is used for analyzing the layout script file and the logic script file based on the script loading assembly and generating the extensible business data corresponding to the extensible code package according to the analysis result and the style control file.
Wherein, the display module includes:
An arrangement order acquisition unit configured to acquire an arrangement order of the native data and the scalable code package in the information stream;
And the data display unit is used for displaying the visual service data corresponding to the original data and the extensible code packet on a page based on the arrangement sequence.
An aspect of an embodiment of the present application provides an information flow processing apparatus, which is applied to a server, including:
The receiving module is used for receiving an information pulling request sent by the terminal equipment and acquiring an information stream aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet;
And the second sending module is used for sending the information stream to the terminal equipment so as to enable the terminal equipment to display the native data and the visual service data corresponding to the expandable code packet.
Wherein, in the information flow processing device, the information flow further comprises a native identifier extensible identifier; the native identifier is used for representing a data type corresponding to the native data, and the extensible identifier is used for representing the data type corresponding to the extensible code packet.
Wherein the apparatus further comprises:
The acquisition module is used for acquiring a code file sent by the third party equipment through the program programming interface and packaging the code file into an extensible code packet; the code file is written by the third party device through an extensible coding platform provided by the programming interface.
An aspect of an embodiment of the present application provides an information stream processing apparatus, including: a processor and a memory;
the processor is connected to a memory, wherein the memory is configured to store a computer program, and the processor is configured to invoke the computer program to perform a method as in one aspect of an embodiment of the present application.
An aspect of an embodiment of the present application provides a computer-readable storage medium storing a computer program comprising program instructions which, when executed by a processor, perform a method as in an aspect of an embodiment of the present application.
According to the embodiment of the application, the information stream containing the original data and the expandable code packet is obtained by sending the information pulling request, and the visualized service data corresponding to the original data and the expandable code packet contained in the information stream are displayed on the page. Therefore, the information flow is constructed by combining the native technology and the extensible technology, so that the information flow can contain the native data obtained by the native technology and also can contain the extensible code packet obtained by the extensible technology, namely, the information type in the information flow can be increased on the premise of not updating the version of the client, the development cost can be reduced, and the display form of the information flow can be enriched.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present application;
Fig. 2 is a schematic view of a scenario of an information stream processing method according to an embodiment of the present application;
Fig. 3 is a timing diagram of an information flow processing method according to an embodiment of the present application;
fig. 4 is a flow chart of an information flow processing method according to an embodiment of the present application;
FIG. 5 is a schematic structural view of an expandable frame according to an embodiment of the present application;
FIG. 6 is an interface diagram for displaying visual business data according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a frame of an information flow processing method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an information flow processing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another information flow processing apparatus according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of yet another information flow processing apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an information flow processing apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present application. The network architecture may include a server 200a and a plurality of terminal devices (as shown in fig. 1, specifically includes a terminal device 100a, a terminal device 100b, and a terminal device 100 c), where the server 200a may perform data transmission with each terminal device through a network, each terminal device may install a reading application (such as WeChat reading), and the server 200a may be a background server corresponding to the reading application, so that each terminal device may perform data transmission with the server 200a through a client corresponding to the reading application, such as the server 200a may send an information stream to each terminal device. The terminal device may include a cell phone, tablet computer, notebook computer, palm top computer, mobile Internet Device (MID) INTERNET DEVICE, wearable device (e.g., smart watch, smart bracelet, etc.). Each terminal device can display information content contained in the information stream in the client corresponding to the reading application, wherein the information stream can be understood as a content aggregator formed by combining a plurality of message sources together, and the information stream can help a user to acquire the content of the message source of interest.
The information content contained in the information stream displayed in each terminal device may be different, and specific information contained in the information stream may be determined by user history behavior corresponding to the terminal device or user portraits or operation activities initiated by the information provider. The historical behavior of the user can be expressed as operations of clicking, reading time, downloading and the like of the user in the client corresponding to the reading application before the current moment; the user portraits can be represented as a labeled user model abstracted according to the information of the user such as attributes, user preferences, life habits and the like; the operation campaign may be represented as advertisement information for a third party application, a voting campaign, etc.
Fig. 2 is a schematic view of a scenario of an information flow processing method according to an embodiment of the present application. As shown in fig. 2, a specific procedure of how to construct an information flow will be described taking the terminal device 100a in the embodiment corresponding to fig. 1 as an example. After the terminal device 100a opens the reading application, a default home page of the reading application may be displayed in the terminal display interface, at least four function buttons may be displayed in the home page, which are respectively denoted as a "find" button, a "bookshelf" button, a "story" button, and a "me" button, and when the user selects the "story" button 10b, the terminal device 100a may jump to a presentation page corresponding to the "story" button 10b, where no data information is displayed in the display area 10a of the presentation page, so that the terminal device 100a may send an information pull request to the server 200a in response to a selection operation of the user for the "story" button 10b, so as to request to obtain an information stream.
After receiving the information pull request sent by the terminal device 100a, the server 200a may determine, based on the device identifier corresponding to the terminal device 100a included in the information pull request, user identifier information corresponding to the terminal device 100a, that is, determine a target user (the terminal device 100a may be bound with user identifier information of the target user), and further obtain an information stream corresponding to the target user, that is, select a plurality of unit information data from recommended information corresponding to the target user (the unit information data refers to a piece of independent information in the recommended information, such as a first chapter in the book a, a trending topic B, advertisement information about a product by the application C, and the like), as the information stream requested by the information pull request by the terminal device 100 a. The plurality of unit information data may include the recommended native data for the target user, which may be chapter data in the electronic reading material determined by the server 200a according to the historical behavior data of the target user or the user portrait, and an extensible code package, which is code data associated with an operation type activity (such as voting activity initiated by the reading type application on a hot topic, advertisement information of a third party application, etc.) acquired by the server 200 a. The extensible code package is a program code written by a developer based on a third party library (such as REACT NATIVE development environment, REACT NATIVE is a cross-platform mobile application development framework), or a program code written by a third party application (other applications except the reading class application) through an encoding platform provided by a programming interface.
The information stream is shown in the list 10c, and each unit information data in the information stream may include: item number, data type, data name or content (or code), etc. For example, the item number corresponding to the first unit information data in the list 10c is 1, the data type is type 1 (may be a data type identifier corresponding to the original data, such as a book, etc.), the name is name 1 (may be "the third chapter of the city" in particular), and the content is the text content of a chapter in the electronic reading material (may be the text content corresponding to the third chapter of the city, etc.); the item number corresponding to the second unit information data in the list 10c is 2, the type is type 2 (which may be represented as a data type identifier corresponding to an extensible code, such as REACT NATIVE, etc.), and the code is a program code corresponding to an operation type activity (which may be specifically a rental advertisement of a rental class application).
The server 200a returns the list 10c (i.e. the information stream) to the terminal device 100a, where the terminal device 100a may process the unit information data based on different frames according to the type corresponding to each unit information data in the information stream (e.g. the native data may be directly rendered based on the native frame, and the extensible code may be rendered based on the native frame after being loaded and parsed based on the extensible frame), so as to display each unit information data in the display area of the terminal device 100 a. For example, after rendering the first unit information data in the list 10c, an information bar 10d is obtained; after the second unit information data in the list 10c is subjected to loading analysis and rendering, the information bar 10e can be obtained. The target user can check the information content corresponding to the information bar by clicking the information bar, for example, the user clicks the information bar 10d and can check the text content corresponding to the third chapter of 'Yicheng'; the user clicks the information field 10e to view the rental advertisement information provided by the rental class application, etc.
Fig. 3 is a timing diagram of an information flow processing method according to an embodiment of the present application. As shown in fig. 3, the information stream processing method may include the steps of:
step S101, sending an information pulling request;
Specifically, the terminal device (corresponding to the terminal device 100a in the embodiment corresponding to fig. 2 described above) may generate the information pull request according to the operation of the target user, for example, the target user clicks the "story" button (corresponding to the "story" button 10b in the embodiment corresponding to fig. 2 described above) in the reading application, or the terminal device may generate the information pull request when the information refresh is performed on the "story" display page in the pull-down reading application. After generating the information pull request, the terminal device may send the information pull request to a server (corresponding to the server 200a in the embodiment corresponding to fig. 2 described above).
Step S102, obtaining an information flow aiming at a target user according to the information pulling request;
Specifically, the server receives an information pulling request sent by the terminal device, determines a target user corresponding to the terminal device based on a device identifier carried by the information pulling request, and further selects a plurality of unit information data from an information list of the target user as an information stream, where the information stream is an aggregation of the information data requested by the information pulling request. The server may determine the information flow for the target user according to the ordering of the unit information data in the information list, and the number of the unit information data requested by each information pull request may be preset (e.g., 10).
It should be noted that, the server may recommend information data that accords with the individuation of the user to each user, and add the recommended information data to the information list corresponding to each user. The determining manner of the user personalized information data may include: determining books which are being read by a user according to the history reading record of the user, determining chapter data which are being read by the user according to the latest progress recorded in the history reading record, and adding the chapter data into an information list corresponding to the user; recommending interesting chapter data for a user from recent trending topics or trending books according to historical behaviors (such as user praise, comment, marking and the like) of the user, and adding the chapter data into an information list corresponding to the user; and acquiring the operation type activities which are being performed by the reading type application, and adding the information data corresponding to each operation type activity into the information list corresponding to the user. The information data such as chapter data recommended to the user is realized based on a native technology, namely, a developer of the reading application is developed and realized based on a native code of an operating system to which the terminal device belongs, so the data can also be called as native data, and the specific expression form of the native data is as follows: { item 1, type: 'book', title: '123', image: '222.Jpg', content: 'I are Chinese' }, i.e. the corresponding item number of the original data is "1", the type is "book", the title is "123", the image is "222.Jpg", and the content is "I are Chinese". For the information data corresponding to the operation type activity, the developer of the reading type application is developed and realized based on the development environment provided by the third party library (such as REACT NATIVE), so that the information data corresponding to the operation type activity is an extensible code package, and the extensible code package is specifically expressed as: { item: 2, type: 'RN', code: 'xxx' }, i.e. the item number corresponding to the scalable code packet is "2", the type is "RN (abbreviation for REACT NATIVE)", and the code is "xxx (specific program code)". The information flow includes not only the native data and the expandable code packet, but also the native identifier and the expandable identifier, where the native identifier is used to characterize a data type corresponding to the native data, and the expandable identifier is used to characterize a data type corresponding to the expandable code packet.
Optionally, the server may obtain the code file sent by the third party device through a programming interface, and encapsulate the code file into an extensible code package. The code files are written by the third party equipment through the extensible coding platform provided by the programming interface, namely, the third party equipment (which can be understood as a third party application) develops through the extensible coding platform provided by the programming interface to obtain the code files corresponding to the operation type activities related to the third party equipment.
Step S103, the information flow is sent;
specifically, the server returns the acquired information stream to the terminal device, so that the terminal device can render and display the information data contained in the information stream.
And step S104, displaying the visual service data corresponding to the original data and the expandable code packet on a page according to the information flow.
Specifically, the terminal device may distribute the unit information data to different frames of the reading application package according to the data type corresponding to each unit information data in the information stream, for example, distribute the native data to the native frame, render the native data based on the native frame, and display the rendered native data on a display page of the terminal device; the method comprises the steps of distributing an extensible code package into an extensible framework, loading and analyzing the extensible code package based on the extensible framework, rendering the analyzed extensible code package based on a native framework (the extensible code package rendered by the native framework can be called as visual service data), and displaying the visual service data on a display page of a terminal device. It can be appreciated that the rendering process of the native data and the loading parsing process of the extensible code packet are processes that are processed independently, i.e., both may be processed simultaneously.
For the visual service data corresponding to the native data and the expandable code packet contained in the information stream, the display order in the display page of the terminal device may be determined according to the arrangement order of the native data and the expandable code packet in the information stream. In other words, based on the arrangement order of the native data and the expandable code packet in the information stream, the arrangement order of the visual service data corresponding to the native data and the expandable code packet on the display page of the terminal device may be determined. For example, if the arrangement order of the scalable code packet a in the information stream is 1, the arrangement order of the scalable code packet a in the presentation page is also 1.
According to the embodiment of the application, the information stream containing the original data and the expandable code packet is obtained by sending the information pulling request, and the visualized service data corresponding to the original data and the expandable code packet contained in the information stream are displayed on the page. Therefore, the information flow is constructed by combining the native technology and the extensible technology, so that the information flow can contain the native data obtained by the native technology and also can contain the extensible code packet obtained by the extensible technology, namely, the information type in the information flow can be increased on the premise of not updating the version of the client, the development cost can be reduced, and the display form of the information flow can be enriched.
Fig. 4 is a schematic flow chart of an information flow processing method according to an embodiment of the present application. As shown in fig. 4, the information stream processing method may include the steps of:
step S201, an information pulling request is sent to a server, so that the server obtains an information stream aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet;
the specific implementation manner of step S201 may refer to step S101 and step S102 in the embodiment corresponding to fig. 3, which are not described herein.
Step S202, receiving the information flow, and acquiring data type identifiers corresponding to each unit of information data in the information flow;
Specifically, the terminal device receives the information stream sent by the server, and because the information stream includes a plurality of unit information data, and each unit information data carries a corresponding data type label, the terminal device can obtain the data type identifier corresponding to each unit information data in the information stream.
Step S203, if the data type identifier is a native identifier, determining the unit information data corresponding to the native identifier as native data;
specifically, if the terminal device obtains that the data type corresponding to the unit information data is the native identifier from the information stream, the unit information data may be determined to be the native data. For example, if the data type corresponding to the unit information data is "book", the unit information data may be determined as the native data; if the data type corresponding to the unit information data is "video", the unit information data can be determined as native data as well; if the data type corresponding to the unit information data is "cartoon (cartoon)", the unit information data may be determined as the native data. The above "book", "video" and "cartoon" may be referred to as native identifiers.
Step S204, distributing the native data to a native frame, and acquiring an information display template from the native frame; the information display template is used for standardizing the display form of the original data;
Specifically, unit information data determined as the native data is distributed into a native frame, and an information display template is acquired from the native frame, which can be used to specify a presentation form of the native data. In other words, the information display template specifies information such as where the title in the unit information data should be displayed, what font is used, and how large a font size is used in the presentation page of the terminal device. In the development process of the reading application, the display form of the information data is standardized, and the information data can be displayed in the display page on the premise that the information data meets the above-mentioned standard.
And step S205, based on the information display template, performing page typesetting on the original data, and displaying the page typeset original data on a page.
Specifically, the unit information data determined as the native data is rendered according to the information display template acquired from the native framework, that is, the unit information data determined as the native data is page-laid out, and the unit information data after being laid out is displayed on the page of the terminal device (e.g., the information field 10d and the information field 10e in the embodiment corresponding to fig. 2 described above).
Step S206, if the data type identifier is an expandable identifier, determining the unit information data as the expandable code packet;
Specifically, if the terminal device obtains that the data type corresponding to the unit information data is the expandable identifier from the information stream, the unit information data may be determined to be an expandable code packet. For example, if the data type corresponding to the unit information data is "RN", the unit information data may be determined as an extensible code packet, that is, the extensible code packet is written based on the RN development environment.
Step S207, the expandable code package is distributed to an expandable framework, and based on the expandable framework, the expandable code package is loaded to obtain expandable service data corresponding to the expandable code package;
Specifically, the terminal device may distribute the unit information data determined as the expandable code packet to the expandable frame, and load and parse the expandable code packet based on the expandable frame to obtain expandable service data corresponding to the expandable code packet. The extensible code package may include a page layout file, a logical script file and a style control file, where the page layout file may be understood as a JSX (JSX is a syntax for abstracting page layout of an extensible framework, and is a syntax format for creating a virtual document object model), the logical script file may be understood as a JavaScript (JavaScript may be abbreviated as JS, and is a client scripting language based on objects and event drivers and having relative security) script file, and the style control file may be understood as a CSS (CASCADING STYLE SHEETS, cascading style sheets, and a computer language for file style) file, that is, a code package in the form of jsx+js+css.
Fig. 5 is a schematic structural diagram of an expandable frame according to an embodiment of the application. As shown in fig. 5, the expandable frame 20a may include three layers, a first layer 20b, a second layer 20c, and a third layer 20d, respectively. The first layer 20b may also be referred to as a Java (an object-oriented programming language that may write cross-platform application software) layer, and may include an interface manager of an operating system, an image loading component, a network request processing component, and the like; the second layer 20C may also be referred to as a c++ (an object-based programming language) layer, and may include script loading components, communication components, translation components, and the like; the third layer 20d may also be referred to as a JS layer, and may include script components, event modules, and coordinators, among others. The JS layer mainly can provide some components and tool libraries for developers, and the extensible code package can be realized based on script components, event modules, coordinators and other components. The load parsing process of the extensible code package can be specifically described as follows: the method can convert the page layout file into a layout script file based on a translation component in the extensible framework, namely convert the JSX file into a JS script form, send the layout script file to a script loading component based on a communication component in the extensible framework, load and analyze the layout script file and the logic script file based on the script loading component, and call a style control file in the loading process to generate extensible business data corresponding to an extensible code package. In other words, after the scalable code package is loaded and parsed, the scalable code package is converted into scalable service data. The communication components in the extensible framework can be used for communication among the components, sharing among processing results of the components is achieved, and the script loading component is used for executing analysis on JS.
Step S208, according to the communication mechanism between the expandable framework and the original framework, converting the data format of the expandable service data into the data format of the original data;
specifically, since the expandable service data obtained by the analysis of the expandable frame does not conform to the data format in the reading application, the terminal device needs to convert the data format of the expandable service data into the data format of the original data according to the communication mechanism between the expandable frame and the original frame, that is, the expandable service data is converted into the following form: { item 1, type: 'xxx', title: 'xxx', image: 'xxx. Jpg', content: 'xxx' }, and information such as item number, title, display picture, and specific content of the data are specifically described.
Step S209, based on the original frame, rendering the format-converted expandable service data to obtain visual service data, and displaying the visual service data on a page.
Specifically, the terminal device sends the format-converted scalable service data to the native frame, and renders the format-converted scalable service data based on the native frame, where the rendering process is the same as the rendering process of the native data (step S204-step S205), and details are not repeated here.
It can be understood that the bottom layer of the reading application installed in the terminal device is encapsulated with a native frame and an extensible frame, the native frame is a core module of the reading application, and can efficiently pull and render information streams for target users to display information to the users. The extensible framework can be used for information display of operation type activities, achieves expandability and dynamic performance of information flows, and can effectively improve compatibility of the information flows.
Fig. 6 is an interface diagram for displaying visual service data according to an embodiment of the present application. Taking an example of an extensible code packet corresponding to a voting activity using an information flow as a trending topic, as shown in fig. 6, when a target user clicks on a "story" button 10b or pushes up a presentation page corresponding to the "story" button 10b or pulls down a presentation page corresponding to the "story" button 10b to refresh, the terminal device 100a may detect a behavioral operation of the user, and generate an information pull request in response to a triggering operation of the user. By sending the information pulling request to the server, so that the server may obtain an information stream from a specified resource address (e.g., in an information list corresponding to the target user) according to the information pulling request, and return the obtained information stream to the terminal device 100a, the terminal device 100a may determine that the information stream is an expandable code packet according to an expandable identifier carried by the information stream, and since the expandable packet cannot be directly rendered by a native frame in the reading application, the terminal device 100a may distribute the expandable code packet to the expandable frame, based on the expandable frame, may parse the expandable code packet into corresponding voting activity data (i.e., expandable service data), and convert the voting activity data into a data format corresponding to native data, and may further typeset and display the voting activity data after format conversion on a display page of the terminal device 100a based on the native frame in the reading application, as shown in the information field 30a, where the information field 30a may include topics (e.g., social donation pictures), voting participation (e.g., small names of voting activity candidates a "," small names of voting activity candidates B "," small candidates of voting activity candidates B "," small names of people "and so on (e.g., small names of people B)".
Fig. 7 is a schematic diagram of a frame of an information flow processing method according to an embodiment of the present application. As shown in fig. 7, the embodiment of the present application may be implemented on a terminal device to which a server 40b (corresponding to the server 200a in the embodiment corresponding to fig. 1) and a client 40a (a client corresponding to a reading class application) belong, and since the information flow is a flow constructed by mixing a native technology and an extensible technology (such as an RN technology), the information flow 40f of the server 40b may include a native data 40g and an extensible code packet 40h (may also be referred to as an RN code packet). In the client 40a, a native framework 40c and an extensible framework 40e, as well as a stream display module 40d, may be included.
The native data 40g refers to recommendation information determined by the server for the user, and the native data may include the type, title, picture, text content of a specific chapter, and the like of the recommendation information.
The extensible code package 40h refers to program code written based on an extensible development environment (e.g., RN development environment) regarding operation activities. The extensible code package 40h may refer to a program code written based on an extensible development environment in a reading class application, or may refer to an extensible program code written by a third party application 40i calling a program programming interface in the extensible development environment to perform operation activity development. The program programming interface refers to an interface provided by the extensible development environment in the reading application for the third party application 40i, and the third party application 40i can call the program programming interface to develop and send the developed extensible program code to the server 40b, so that the server 40b can package the received extensible program code into the extensible code package 40h.
The native framework 40c is configured to render the native data 40g returned by the server 40b, that is, typeset the native data 40g returned by the server 40b under the native framework 40c, so that an information typesetting form corresponding to the native data 40g conforms to an information display specification in the client information stream, and display information corresponding to the native data 40g in the information stream. The information flow information display form in the client 40a is the information typesetting form generated under the native framework 40 c. The information display specification specifies the form in which the information is presented.
The expandable framework 40e is configured to perform load analysis on the expandable code packet 40h returned by the server 40b, that is, perform load analysis on the expandable code packet 40h returned by the server 40b under the expandable framework 40e, so as to obtain data (which may also include a title, a picture, a content, and the like of information) corresponding to the expandable code packet 40 h. Since the format of the data after loading and parsing (i.e. the data format) is different from the data format of the native data 40g, the client 40a cannot render the data directly, and therefore, a communication mechanism between the extensible framework 40e and the native framework 40c is also required to convert the data after loading and parsing into a data format that can be identified and rendered by the native framework 40e, so that the data generated under the extensible framework 40e can be displayed in the client 40 a.
The information flow display 40d is used for displaying the rendered native data 40g of the native frame 40c and the visual service data corresponding to the extensible code packet 40 h.
According to the embodiment of the application, the information stream containing the original data and the expandable code packet is obtained by sending the information pulling request, and the visualized service data corresponding to the original data and the expandable code packet contained in the information stream are displayed on the page. Therefore, the information flow is constructed by combining the native technology and the extensible technology, so that the information flow can contain the native data obtained by the native technology and also can contain the extensible code packet obtained by the extensible technology, namely, the information type in the information flow can be increased on the premise of not updating the version of the client, the development cost can be reduced, and the display form of the information flow can be enriched.
Fig. 8 is a schematic structural diagram of an information flow processing apparatus according to an embodiment of the present application. As shown in fig. 8, the information stream processing apparatus 1 may be applied to the terminal device 100a in the embodiment corresponding to fig. 2 described above, and the information stream processing apparatus 1 may include: a first transmitting module 11 and a display module 12;
A first sending module 11, configured to send an information pull request to a server, so that the server obtains an information flow for a target user according to the information pull request; the information stream includes native data and an extensible code packet;
And the display module 12 is used for receiving the information flow, and displaying the native data and the visual service data corresponding to the expandable code packet on a page according to the information flow.
The specific function implementation manner of the first sending module 11 and the display module 12 may refer to step S101 and step S104 in the embodiment corresponding to fig. 3, which are not described herein.
Referring to fig. 8, the information stream includes a plurality of unit information data;
the display module 12 may include: a type identification acquisition unit 121, a native data determination unit 122, an extensible code packet determination unit 123, an arrangement order acquisition unit 124, a data display unit 125;
A type identifier obtaining unit 121, configured to receive the information stream, and obtain a data type identifier corresponding to each unit information data in the information stream;
A native data determining unit 122, configured to determine that the unit information data is the native data if the data type identifier is a native identifier, and display the native data based on a native frame;
An expandable code packet determining unit 123, configured to determine that the unit information data is the expandable code packet if the data type identifier is an expandable identifier, and display visual service data corresponding to the expandable code packet based on an expandable frame and the native frame;
an arrangement order acquisition unit 124 for acquiring an arrangement order of the native data and the scalable code package in the information stream;
And a data display unit 125, configured to display the native data and the visual service data corresponding to the expandable code packet on a page based on the arrangement order.
The specific function implementation manner of the type identifier obtaining unit 121, the native data determining unit 122, the scalable code packet determining unit 123 may refer to step S202 to step S209 in the embodiment corresponding to fig. 4, the arrangement order obtaining unit 124, and the specific function implementation manner of the data display unit 125 may refer to step S104 in the embodiment corresponding to fig. 3, which are not described herein.
Referring also to fig. 8, the native data determination unit 122 may include: a judgment subunit 1221, a first distribution subunit 1222, a layout subunit 1223;
A judging subunit 1221, configured to determine, if the data type identifier is a native identifier, unit information data corresponding to the native identifier as native data;
A first distribution subunit 1222 for distributing the native data into a native framework, from which an information display template is obtained; the information display template is used for standardizing the display form of the original data;
And the typesetting subunit 1223 is configured to perform page typesetting on the native data based on the information display template, and display the native data after page typesetting on a page.
The specific functional implementation manners of the judging subunit 1221, the first distributing subunit 1222, and the typesetting subunit 1223 may refer to step S203 to step S205 in the embodiment corresponding to fig. 4, which are not described herein.
Referring to fig. 8 together, the scalable code packet determining unit 123 may include: a second distribution sub-unit 1231, a format conversion sub-unit 1232, and a rendering sub-unit 1233;
A second distributing subunit 1231, configured to distribute the scalable code packet to an expandable framework, and load the scalable code packet based on the expandable framework, to obtain scalable service data corresponding to the scalable code packet;
A format conversion subunit 1232, configured to convert, according to a communication mechanism between the expandable framework and the native framework, a data format to which the expandable service data belongs into a data format to which the native data belongs;
And the rendering subunit 1233 is configured to render the format-converted extensible service data based on the native framework, obtain visual service data, and display the visual service data on a page.
The specific functional implementation manners of the second distributing subunit 1231, the format converting subunit 1232, and the rendering subunit 1233 may refer to step S207 to step S209 in the embodiment corresponding to fig. 4, which are not described herein.
Referring to fig. 8, the extensible code package includes a page layout file, a logic script file, and a style control file;
the second distribution sub-unit 1231 may include: a conversion subunit 12311, a script transmission subunit 12312, a parsing subunit 12313;
A conversion subunit 12311 configured to distribute the extensible code package into an extensible framework, and convert the page layout file into a layout script file based on a translation component in the extensible framework;
a script sending subunit 12312, configured to send, based on the communication component in the extensible framework, the layout script file to a script loading component;
And the analysis subunit 12313 is configured to analyze the layout script file and the logic script file based on the script loading component, and generate, according to an analysis result and the style control file, extensible service data corresponding to the extensible code packet.
The specific functional implementation manner of the conversion subunit 12311, the script sending subunit 12312, and the parsing subunit 12313 may refer to step S207 in the embodiment corresponding to fig. 4, which is not described herein.
According to the embodiment of the application, the information stream containing the original data and the expandable code packet is obtained by sending the information pulling request, and the visualized service data corresponding to the original data and the expandable code packet contained in the information stream are displayed on the page. Therefore, the information flow is constructed by combining the native technology and the extensible technology, so that the information flow can contain the native data obtained by the native technology and also can contain the extensible code packet obtained by the extensible technology, namely, the information type in the information flow can be increased on the premise of not updating the version of the client, the development cost can be reduced, and the display form of the information flow can be enriched.
Fig. 9 is a schematic structural diagram of another information flow processing apparatus according to an embodiment of the present application. As shown in fig. 9, the information flow processing apparatus 2 may be applied to the server 200a in the embodiment corresponding to fig. 2, and the information flow processing apparatus 2 may include: a receiving module 21, a second transmitting module 22;
A receiving module 21, configured to receive an information pull request sent by a terminal device, and obtain an information flow for a target user according to the information pull request; the information stream includes native data and an extensible code packet;
And the second sending module 22 sends the information stream to the terminal equipment so that the terminal equipment displays the native data and the visual service data corresponding to the expandable code packet.
The specific functional implementation manner of the receiving module 21 and the second sending module 22 may refer to step S102-step S103 in the embodiment corresponding to fig. 3, which is not described herein.
Referring to fig. 9, the information flow processing apparatus 2 may further include: an acquisition module 23;
An obtaining module 23, configured to obtain, through a program programming interface, a code file sent by a third party device, and package the code file into an extensible code packet; the code file is written by the third party device through an extensible coding platform provided by the programming interface.
The specific functional implementation manner of the obtaining module 23 may refer to step S102 in the embodiment corresponding to fig. 3, which is not described herein.
According to the embodiment of the application, the information stream containing the original data and the expandable code packet is obtained by sending the information pulling request, and the visualized service data corresponding to the original data and the expandable code packet contained in the information stream are displayed on the page. Therefore, the information flow is constructed by combining the native technology and the extensible technology, so that the information flow can contain the native data obtained by the native technology and also can contain the extensible code packet obtained by the extensible technology, namely, the information type in the information flow can be increased on the premise of not updating the version of the client, the development cost can be reduced, and the display form of the information flow can be enriched.
Fig. 10 is a schematic structural diagram of another information flow processing apparatus according to an embodiment of the present application. As shown in fig. 10, the information stream processing apparatus 1000 may correspond to the terminal device 100a in the embodiment corresponding to fig. 2 described above, and the information stream processing apparatus 1000 may include: processor 1001, network interface 1004, and memory 1005, and the above-described information flow processing apparatus 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. 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 (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 10, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 1005, which is one type of computer-readable storage medium.
In the information flow processing apparatus 1000 shown in fig. 10, the network interface 1004 may provide a network communication function; while user interface 1003 is primarily used as an interface for providing input to a user; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
Sending an information pulling request to a server so that the server obtains an information stream aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet;
And receiving the information flow, and displaying the native data and the visual service data corresponding to the expandable code packet on a page according to the information flow.
It should be understood that the information flow processing apparatus 1000 described in the embodiment of the present application may perform the description of the information flow processing method in the embodiment corresponding to any one of fig. 3 and fig. 4, and may also perform the description of the information flow processing apparatus 1 in the embodiment corresponding to fig. 8, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, where a computer program executed by the information stream processing apparatus 1 mentioned above is stored, and the computer program includes program instructions, when executed by the processor, can execute the description of the information stream processing method in any of the embodiments corresponding to fig. 3 and fig. 4, and therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
Referring to fig. 11, fig. 11 is a schematic structural diagram of another information flow processing apparatus according to an embodiment of the present application. As shown in fig. 11, the information flow processing apparatus 2000 may correspond to the server 200a in the embodiment corresponding to fig. 2, and the information flow processing apparatus 2000 may include: processor 2001, network interface 2004, and memory 2005, and in addition, the above-described information stream processing apparatus 2000 may further include: a user interface 2003, and at least one communication bus 2002. Wherein a communication bus 2002 is used to enable connected communications between these components. The user interface 2003 may include a Display screen (Display), a Keyboard (Keyboard), and the optional user interface 2003 may further include a standard wired interface, a wireless interface, among others. The network interface 2004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 2005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 2005 may also optionally be at least one storage device located remotely from the aforementioned processor 2001. As shown in fig. 11, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 2005 as one type of computer-readable storage medium.
In the information flow processing apparatus 2000 shown in fig. 11, the network interface 2004 may provide a network communication function; while user interface 2003 is primarily an interface for providing input to a user; and processor 2001 may be used to invoke device control applications stored in memory 2005 to implement:
Receiving an information pulling request sent by a terminal device, and acquiring an information stream aiming at a target user according to the information pulling request; the information stream includes native data and an extensible code packet;
And sending the information stream to the terminal equipment so that the terminal equipment displays the native data and the visual service data corresponding to the extensible code packet.
It should be understood that the information flow processing apparatus 2000 in the embodiment of the present application may perform the description of the information flow processing method in the embodiment corresponding to fig. 3, and may also perform the description of the information flow processing apparatus 2 in the embodiment corresponding to fig. 9, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the 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 information stream processing apparatus 2 mentioned above, where the computer program includes program instructions, when executed by the processor, can perform the description of the information stream processing method in the embodiment corresponding to fig. 3, and therefore, a description will not be repeated herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps 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 (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (8)

CN201910610619.7A2019-07-082019-07-08Information stream processing method, device and computer readable storage mediumActiveCN112199090B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910610619.7ACN112199090B (en)2019-07-082019-07-08Information stream processing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910610619.7ACN112199090B (en)2019-07-082019-07-08Information stream processing method, device and computer readable storage medium

Publications (2)

Publication NumberPublication Date
CN112199090A CN112199090A (en)2021-01-08
CN112199090Btrue CN112199090B (en)2024-08-06

Family

ID=74004251

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910610619.7AActiveCN112199090B (en)2019-07-082019-07-08Information stream processing method, device and computer readable storage medium

Country Status (1)

CountryLink
CN (1)CN112199090B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114595384A (en)*2022-02-252022-06-07北京字节跳动网络技术有限公司Book recommendation method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107172151A (en)*2017-05-182017-09-15百度在线网络技术(北京)有限公司Method and apparatus for pushed information
CN109460233A (en)*2018-10-252019-03-12北京字节跳动网络技术有限公司Primary interface display update method, device, terminal device and the medium of the page

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105354014B (en)*2014-08-182018-10-23阿里巴巴集团控股有限公司Application interface renders methods of exhibiting and device
CN109800036A (en)*2017-11-152019-05-24广州市动景计算机科技有限公司Information flow page display method, system, calculates equipment and storage medium at device
CN109901836B (en)*2019-02-272022-07-22北京奇艺世纪科技有限公司Information flow display method and device and client device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107172151A (en)*2017-05-182017-09-15百度在线网络技术(北京)有限公司Method and apparatus for pushed information
CN109460233A (en)*2018-10-252019-03-12北京字节跳动网络技术有限公司Primary interface display update method, device, terminal device and the medium of the page

Also Published As

Publication numberPublication date
CN112199090A (en)2021-01-08

Similar Documents

PublicationPublication DateTitle
CN106569900B (en)Applied program processing method and device
US9887873B2 (en)Custom rendering of web pages based on web page requests
US20190272313A1 (en)Dynamic generation of mobile web experience
US20120159310A1 (en)Method for converting mobile web application into native application and apparatus using the same
CN112328140B (en)Image input method, device, equipment and medium thereof
CN112256990B (en)Image processing method and device and computer readable storage medium
CN112199090B (en)Information stream processing method, device and computer readable storage medium
CN110618811A (en)Information presentation method and device
US20010049733A1 (en)Content distribution system
RU2634221C2 (en)Method and device for drawing presentation of electronic document on screen
JP2010262548A (en) Data providing method and server
CN114422468A (en)Message processing method, device, terminal and storage medium
EP4418089A1 (en)Data processing method and apparatus, electronic device, and storage medium
CN113296771B (en)Page display method, device, equipment and computer readable medium
CN115659085A (en)Interactive resource processing method and device and teaching method and device
HK40038199A (en)Information stream processing method and apparatus, and computer readable storage medium
CN113535417B (en)Data interaction device and method
CN114840269A (en)Dialog box display method and device, electronic equipment and storage medium
Rodrigues et al.New trends on ubiquitous mobile multimedia applications
US8291311B2 (en)Web display program conversion system, web display program conversion method and program for converting web display program
CN115809363A (en) Content push method, device, electronic device and storage medium
JP2013210911A (en)Information processing device, information processing system and program
KR102261152B1 (en)Apparatus for creating application
CN113568593A (en)Content transmission method and device and electronic equipment
CN104995619B (en)Webpage processing method and equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
REGReference to a national code

Ref country code:HK

Ref legal event code:DE

Ref document number:40038199

Country of ref document:HK

SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp