Disclosure of Invention
In view of the above, the present invention provides a data updating method, an apparatus and an electronic device, so as to solve the problem that the video navigation interface of the terminal device needs to be updated urgently.
In order to solve the technical problems, the invention adopts the following technical scheme:
a data updating method is applied to a server and comprises the following steps:
acquiring a data updating request sent by terminal equipment; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
determining a data updating result corresponding to the data updating request, and feeding back the data updating result to the terminal equipment so that the terminal equipment performs page rendering according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
Optionally, if the data update request includes a location update request of data to be updated, determining a data update result corresponding to the data update request includes:
acquiring page layout data of the data to be updated, and displaying pages;
and after the page layout data is displayed, acquiring adjusted page layout data corresponding to the data to be updated and input by a user, and taking the adjusted page layout data as the data updating result.
Optionally, if the data update request includes a content update request of data to be updated, determining a data update result corresponding to the data update request includes:
acquiring all target data corresponding to the content updating request of the data to be updated;
and screening out target data meeting preset conditions from all the target data, and taking the target data as the data updating result.
A data updating method is applied to terminal equipment and comprises the following steps:
acquiring data to be updated, and inquiring an updating rule corresponding to the data to be updated;
when the current time reaches the updating time of the data to be updated according to the updating rule, sending a data updating request to a server; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
receiving a data updating result which is fed back by the server and corresponds to the data updating request;
rendering a page according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
Optionally, if the data update request includes a content update request of data to be updated, sending the data update request to the server, including:
and inquiring a data updating port corresponding to the data to be updated, and sending a data updating request to a server through the data updating port.
Optionally, if the data update request includes a location update request of data to be updated, receiving a data update result corresponding to the data update request and fed back by the server, and performing page rendering according to the data update result, including:
receiving adjusted page layout data of the data to be updated fed back by the server;
and adjusting the position of the data to be updated according to the adjusted page layout data.
A data updating device applied to a server, the data updating device comprising:
the request acquisition module is used for acquiring a data updating request sent by the terminal equipment; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
the data updating module is used for determining a data updating result corresponding to the data updating request and feeding the data updating result back to the terminal equipment so that the terminal equipment can perform page rendering according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
A data updating device is applied to a terminal device, and the data updating method comprises the following steps:
the data acquisition module is used for acquiring data to be updated and inquiring an update rule corresponding to the data to be updated;
the request sending module is used for sending a data updating request to the server when the current time is determined to reach the updating time of the data to be updated according to the updating rule; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
a result receiving module, configured to receive a data update result corresponding to the data update request and fed back by the server;
the page rendering module is used for rendering a page according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
acquiring a data updating request sent by terminal equipment; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
determining a data updating result corresponding to the data updating request, and feeding back the data updating result to the terminal equipment so that the terminal equipment performs page rendering according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
acquiring data to be updated, and inquiring an updating rule corresponding to the data to be updated;
when the current time reaches the updating time of the data to be updated according to the updating rule, sending a data updating request to a server; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
receiving a data updating result which is fed back by the server and corresponds to the data updating request;
rendering a page according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a data updating method, a data updating device and electronic equipment, wherein terminal equipment can send a data updating request to a server, and then page rendering is carried out based on a data updating result fed back by the server, so that the updating of a video navigation interface of the terminal equipment is realized, the content of the video navigation interface watched by a user can be ensured to be latest, and the user experience of the user can be improved. In addition, when the video navigation interface is updated, the data to be updated can be updated from two aspects of content and position, so that the content can be updated, the flexible change of the interface typesetting of the video navigation interface can be realized by adjusting the position of the data to be updated, and the personalized requirements of users on the interface typesetting can be further met.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 shows a video navigation interface of a terminal device (including but not limited to a terminal such as a mobile phone, a television, etc.), the video navigation interface includes columns such as a drama, a news, a selection, a high-definition review, a comprehensive platform, etc., one column has a corresponding special subject list, if the column is a drama, the corresponding special subject list includes special subjects such as "ancient clothing", "youth", "children", "city", etc., referring to fig. 2, if the special subject is "animation watching at will", the special subject includes a plurality of videos therein, such as videos including a chicken squad, a rui-chian baby, a mikaokou story, etc. In the embodiment, the topic is taken as a single module, and the content and the position of the topic can be adjusted.
In practical application, before generating a video navigation interface, a topic of the video navigation interface needs to be configured, and specifically, the topic configuration mainly includes the following steps:
1. creating a topic
Manually creating a special subject in the special subject management system, filling in special subject attributes, and setting a data source of the special subject (the data source is used for acquiring a data updating result). After the information is filled in, a new topic is generated after the information is selected and stored. The topic may include a program list, a program poster, a program name, a playing address of the program, and the like.
2. Review of
After the special subject is submitted, the state of the special subject is changed into a state to be audited, if the audit (the audit has at most ten audits, the audit times can be set by the system audit under the system setting) is completely passed, the state of the special subject is changed into a state to be issued, and if the audit is rejected, the state of the special subject is changed into a state of rejecting the audit. The information is not filled in when the audit is passed, but the reject is reasonable, and the audit opinion or the text box is filled with the written idea and rejected.
3. Issue a publication
And after the examination of the special topic is completely passed, the special topic enters a state to be issued. The special subject to be issued can be issued and rejected, the state of the special subject after successful issuing is changed into the issued state, and the state of the special subject successful rejected issuing is changed into the rejected issuing state.
After the topic is issued, the topic can be used on a portal (a navigation portal presented to the user after the user is started, which can also be called a video navigation interface) home page, and the displayed position can be customized by an operator.
Subject other operations
4. Check and refute
The topics are rejected during the examination, the topics are displayed in a reject list, and the topics can be edited. The resubmitted special subject is returned to the state of waiting for review.
5. Issue refute
And the rejected topic is issued, editing can be performed, the rejected topic is submitted again after the editing is completed, and the rejected topic is issued and can be deleted.
6. Editing topics
(1) Editing under new-built and released rejection state
The attribute of the topic can be edited, then the submission can be carried out, and after the submission is successful, the state of the topic is changed into to-be-audited.
(2) Editing in a state to be audited and released
And operation and editing are not allowed in the to-be-released state.
(3) Editing in the release state
The topics in the release state can be edited, a copy of the original topics can be generated by clicking on the editing of the topics in the release state, the attributes of the topics can be edited, and the original topics can be replaced by the copy topics after the copy is released.
7. Deleting a topic
In the special topic list, one or more special topics can be selected to be deleted, but the special topics are to be examined and released, the released special topics can not be deleted, and the new, edited and rejected special topics can be deleted.
8. Special topic of putting down
The special subject which is off the shelf can be reissued, edited, published at regular time, previewed, hung in columns or deleted. After the new issue, the special subject directly enters the issue state. And setting time, and after the topic is issued at regular time, entering a to-be-issued state. After the topic is deleted, the topic is deleted from the topic library and the release list.
In practical application, the topics can be classified according to the attribute of the topics, such as the topics needing to be updated in real time, the topics updated at regular time, and the topics customized according to the watching habits of the user.
The topics to be updated in real time can be 'latest online', 'viewing history', 'my collection', and the like, and the topics are characterized in that updating is required in real time along with the viewing habits of users or the online and offline conditions of videos, for example, a video which is just online needs to be listed as a 'latest online' topic, and if the online time of the video exceeds 7 days, the topic needs to be removed from the 'latest online' topic.
The topic updated regularly can be a ranking list or the like, the ranking list can be a TV series or a movie or the like which the last user likes to watch, the topic is updated according to the updating period, the content of the topic is unchanged in one updating period, and the content of the topic acquired by all users is the same.
The special topic customized according to the watching habits of the user can be a 'guess you like' special topic, and the special topic is characterized in that videos meeting the watching preferences of the user need to be pushed according to the historical watching behaviors of the user, and the corresponding contents of different users of the special topic are different.
In summary, the topic content of the video navigation interface of the terminal device needs to be updated in real time or at regular time, so that the video navigation interface watched by the user is ensured to be the latest interface. The inventor finds that the content of the subject can request for updating from the server through an Application Programming Interface (API), the server returns the updated content, and then the terminal device performs page rendering to obtain an updated video navigation Interface. However, the location of the topic is fixed regardless of the video navigation interface before or after the update, and only the content of the topic is updated, for example, "guess you like" the first position of the topic in the tv series column. The method is characterized in that after the typesetting of the video navigation interface is determined, the thematic typesetting is taken as a whole, programming is carried out manually according to the typesetting to obtain a code with a fixed thematic position but with an updatable thematic content, and then the thematic position is unalterable, and the modification of the thematic position can be realized only by manually modifying the code.
However, in practical application, a user may want to modify the composition of the video navigation interface, that is, adjust the positions of the topics in the video navigation interface, and the inventor further finds that the topics can be packaged in a modularized manner, that is, independently, and the topics are independent from each other and can be operated independently, so that the positions of the topics in the video navigation interface can be adjusted arbitrarily through interaction between the server and the terminal device. The server in this embodiment may be a background topic system.
Specifically, referring to fig. 3, the data updating method may include:
and S11, the terminal equipment sends a data updating request to the server.
In practical application, different subjects in a video navigation interface of the terminal equipment acquire data from different data sources, and all the data sources can be arranged in the same server or different data sources can be arranged in different servers. Each topic corresponds to a data updating port API, and when different topics are updated, data updating is requested to a corresponding data source in the server through the API corresponding to the topic.
In addition, different topics have different attributes, and in practical applications, topics can be classified according to the attributes of topics, for example, the topics can include topics to be updated in real time, topics to be updated at regular time, and topics customized according to the watching habits of users, and further, the updating frequency of different topics is different, and different topics are updated at different times. In this embodiment, the corresponding update rule is configured for the topic in advance, if the update rule of the topic configuration that needs to be updated in real time is updated in real time, the update rule of the topic configuration that is updated regularly is updated at intervals of a specified time, such as half an hour, etc., and the update rule of the topic configuration that is customized according to the watching habits of the user is updated at intervals of a fixed time, such as half an hour, etc.
The terminal device monitors whether the theme needs to be updated according to the update rule, the theme in this embodiment may be called data to be updated, the update rule of the theme is the update rule of the data to be updated, and when it is monitored according to the update rule that the data to be updated needs to be updated at the current time, the terminal device sends a data update request to the server. The data updating request may include two types, one is a content updating request of the data to be updated, that is, a content of the topic is updated, and the other is a location updating request of the data to be updated, that is, a location of the topic is updated.
In the present embodiment, it is also necessary to transmit a data update request when the update rule is satisfied when the subject location update is performed, and it is also possible to transmit a data update request when the user wants to perform the subject location update, and it is not necessary to transmit a data update request at a specific time when the update rule is satisfied.
And S12, the server determines a data updating result corresponding to the data updating request.
And the server determines the data updating result in different modes according to different contents of the data updating request. Specifically, if the data update request is a location update request of the data to be updated, the process of determining the data update result corresponding to the data update request is as follows:
1) and acquiring page layout data of the data to be updated, and displaying the page.
The page layout data of the data to be updated refers to the layout data of the page where the data to be updated is located, as shown in fig. 1, different topics are arranged at different positions in fig. 1, the relative position between different topics in the same column is the layout data, and after the layout data is obtained, the layout data is displayed on a display interface, for example, a display screen.
2) And after the page layout data is displayed, acquiring adjusted page layout data corresponding to the data to be updated and input by a user, and taking the adjusted page layout data as the data updating result.
After the typesetting data is displayed on a display interface, for example, after the typesetting data is displayed on a display screen, a user can adjust the position of a subject according to the own requirements, and can adjust the position by adopting mouse clicking, dragging and other modes, so that the adjusted page typesetting data meeting the requirements of the user is obtained and is used as a data updating result.
And after the adjusted page layout data is obtained, the page layout data can be sent to the terminal equipment, and the terminal equipment can perform layout adjustment according to the adjusted page layout data and perform page rendering to obtain an updated video navigation interface.
If the data updating request comprises a content updating request of data to be updated, determining a data updating result corresponding to the data updating request, wherein the data updating result comprises the following steps:
1) and acquiring all target data corresponding to the content updating request of the data to be updated.
Specifically, the server stores various data, such as user viewing history, leaderboard of all videos, online and offline information of videos, and the like, and when receiving the data to be updated, the server queries target data corresponding to the data to be updated. For example, if a topic is a leader board that needs to be displayed. And then the server calls the api to acquire the ranking list data to obtain a batch of programs, and fills a special program list.
2) And screening out target data meeting preset conditions from all the target data, and taking the target data as the data updating result.
Due to the fact that the special display interface is limited, only a preset number of videos can be displayed, the target data can be screened after being obtained, and for example, the preset number of videos before ranking are screened out and sent to the terminal device for displaying.
And S13, the server sends the data updating result to the terminal equipment.
And S14, the terminal equipment performs page rendering according to the data updating result.
The server and the terminal equipment can communicate in a wireless mode, after the server obtains the data updating result, the server wirelessly updates the data updating result, and the terminal equipment can render a page according to the data updating result.
In this embodiment, the terminal device may send a data update request to the server, and then perform page rendering based on a data update result fed back by the server, so as to update the video navigation interface of the terminal device, thereby ensuring that the content of the video navigation interface watched by the user is up-to-date, and further improving the user experience of the user. In addition, when the video navigation interface is updated, the data to be updated can be updated from two aspects of content and position, so that the content can be updated, and the flexible change of the interface typesetting of the video navigation interface can be realized by adjusting the position of the data to be updated.
The data updating method in the embodiment can realize automatic updating of portal home page content, can directly acquire data from a data source without manual participation, can liberate manpower, reduces the labor cost, and can ensure the accuracy and timeliness of the data.
In addition, the topics in the embodiment are independently packaged, so that problems occur in a certain topic, such as display errors, the topic can be independently adjusted, other topics cannot be influenced, and independent adjustment of the topic is realized.
Optionally, on the basis of the data updating method applied to the server, another embodiment of the present invention provides a data updating apparatus applied to the server, including:
a request obtaining module 11, configured to obtain a data update request sent by a terminal device; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
the data updating module 12 is configured to determine a data updating result corresponding to the data updating request, and feed back the data updating result to the terminal device, so that the terminal device performs page rendering according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
If the data update request includes a content update request of data to be updated, the data update module 12 is specifically configured to, when determining a data update result corresponding to the data update request:
and acquiring all target data corresponding to the content updating request of the data to be updated, screening out the target data meeting preset conditions from all the target data, and taking the target data as the data updating result.
If the data update request includes a location update request of data to be updated, the data update module 12 is specifically configured to, when determining a data update result corresponding to the data update request:
and acquiring page layout data of the data to be updated, displaying pages, and acquiring adjusted page layout data corresponding to the data to be updated and input by a user after the page layout data is displayed, wherein the adjusted page layout data is used as the data updating result.
Optionally, on the basis of the data updating method applied to the server, another embodiment of the present invention provides a data updating apparatus applied to a terminal device, and with reference to fig. 5, the data updating apparatus may include:
the data acquisition module 21 is configured to acquire data to be updated and query an update rule corresponding to the data to be updated;
a request sending module 22, configured to send a data update request to the server when it is determined that the current time reaches the update time of the data to be updated according to the update rule; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
a result receiving module 23, configured to receive a data update result corresponding to the data update request and fed back by the server;
the page rendering module 25 is configured to perform page rendering according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
Further, if the data update request includes a content update request of data to be updated, the request sending module 22 is specifically configured to, when sending the data update request to the server:
and inquiring a data updating port corresponding to the data to be updated, and sending a data updating request to a server through the data updating port.
Further, if the data update request includes a location update request of data to be updated, the result receiving module 23 is configured to receive a data update result corresponding to the data update request and fed back by the server, and when performing page rendering according to the data update result, the packet is specifically configured to:
and receiving the adjusted page layout data of the data to be updated fed back by the server, and adjusting the position of the data to be updated according to the adjusted page layout data.
In this embodiment, the terminal device may send a data update request to the server, and then perform page rendering based on a data update result fed back by the server, so as to update the video navigation interface of the terminal device, thereby ensuring that the content of the video navigation interface watched by the user is up-to-date, and further improving the user experience of the user. In addition, when the video navigation interface is updated, the data to be updated can be updated from two aspects of content and position, so that the content can be updated, and the flexible change of the interface typesetting of the video navigation interface can be realized by adjusting the position of the data to be updated.
The data updating method in the embodiment can realize automatic updating of portal home page content, can directly acquire data from a data source without manual participation, can liberate manpower, reduces the labor cost, and can ensure the accuracy and timeliness of the data.
In addition, the topics in the embodiment are independently packaged, so that problems occur in a certain topic, such as display errors, the topic can be independently adjusted, other topics cannot be influenced, and independent adjustment of the topic is realized.
Optionally, on the basis of the data updating method applied to the server, another embodiment of the present invention provides an electronic device, including: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
acquiring a data updating request sent by terminal equipment; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
determining a data updating result corresponding to the data updating request, and feeding back the data updating result to the terminal equipment so that the terminal equipment performs page rendering according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
Optionally, on the basis of the data updating method applied to the server, another embodiment of the present invention provides an electronic device, including: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
acquiring data to be updated, and inquiring an updating rule corresponding to the data to be updated;
when the current time reaches the updating time of the data to be updated according to the updating rule, sending a data updating request to a server; the data updating request comprises a content updating request of the data to be updated and/or a position updating request of the data to be updated;
receiving a data updating result which is fed back by the server and corresponds to the data updating request;
rendering a page according to the data updating result; and independently packaging the special subjects in the display page of the terminal equipment.
In this embodiment, the terminal device may send a data update request to the server, and then perform page rendering based on a data update result fed back by the server, so as to update the video navigation interface of the terminal device, thereby ensuring that the content of the video navigation interface watched by the user is up-to-date, and further improving the user experience of the user. In addition, when the video navigation interface is updated, the data to be updated can be updated from two aspects of content and position, so that the content can be updated, and the flexible change of the interface typesetting of the video navigation interface can be realized by adjusting the position of the data to be updated.
The data updating method in the embodiment can realize automatic updating of portal home page content, can directly acquire data from a data source without manual participation, can liberate manpower, reduces the labor cost, and can ensure the accuracy and timeliness of the data.
In addition, the topics in the embodiment are independently packaged, so that problems occur in a certain topic, such as display errors, the topic can be independently adjusted, other topics cannot be influenced, and independent adjustment of the topic is realized.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.