Nothing Special   »   [go: up one dir, main page]

CN113221039A - Page display method and device, computer equipment and storage medium - Google Patents

Page display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113221039A
CN113221039A CN202110441402.5A CN202110441402A CN113221039A CN 113221039 A CN113221039 A CN 113221039A CN 202110441402 A CN202110441402 A CN 202110441402A CN 113221039 A CN113221039 A CN 113221039A
Authority
CN
China
Prior art keywords
webpage
task
computing
data
triggering
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.)
Pending
Application number
CN202110441402.5A
Other languages
Chinese (zh)
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.)
Shenzhen Kingdee Tianyanyun Computing Co ltd
Original Assignee
Shenzhen Kingdee Tianyanyun Computing 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 Shenzhen Kingdee Tianyanyun Computing Co ltd filed Critical Shenzhen Kingdee Tianyanyun Computing Co ltd
Priority to CN202110441402.5A priority Critical patent/CN113221039A/en
Publication of CN113221039A publication Critical patent/CN113221039A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a page display method, a page display device, computer equipment and a storage medium. The method comprises the following steps: acquiring a data identifier and a corresponding task triggering condition sent by a webpage front end; constructing a back-end computing flow corresponding to the data identification; generating a corresponding task trigger according to the task trigger condition; triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identification according to the back-end computing process to obtain a computing result; and sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end, so that the webpage front end performs webpage display based on the calculation result. By adopting the method, the page display efficiency can be improved.

Description

Page display method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a page display method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, information is often presented through web pages. In the conventional method, a user needs to manually perform a trigger operation on the web page front end to trigger the web page front end to request the required target data from the server. The server returns corresponding target data to the front end of the webpage according to the request, so that the target data can be presented in the form of the webpage at the front end of the webpage.
Therefore, the content displayed by the webpage depends on the user operation, and if the user does not manually perform corresponding triggering operation, the target data cannot be obtained in time, so that the efficiency of displaying the target page is influenced. For example, if the target data is updated, but the user does not manually trigger the refresh operation, the updated target data cannot be obtained in time, so that the updated target webpage cannot be displayed in time.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a page display method, device, computer device and storage medium capable of improving efficiency.
A method of page display, the method comprising:
acquiring a data identifier and a corresponding task triggering condition sent by a webpage front end;
constructing a back-end computing flow corresponding to the data identification;
generating a corresponding task trigger according to the task trigger condition;
triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identification according to the back-end computing process to obtain a computing result;
and sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end, so that the webpage front end performs webpage display based on the calculation result.
In one embodiment, constructing a back-end computing flow corresponding to the data identifier includes:
searching a data operator and target data corresponding to the data identifier;
and combining the data operator and the target data according to a preset display form to obtain the back-end calculation flow matched with the preset display form.
In one embodiment, the method further comprises:
forming a task by the task trigger, the back-end computing process and the sending event;
the triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process to obtain a computing result, and the method comprises the following steps:
if the task triggering condition is met, triggering and executing the task through the corresponding task trigger, so as to perform calculation processing on target data corresponding to the data identifier according to the back-end calculation flow in the task, obtain a calculation result and store the calculation result in a sending event;
the sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end comprises:
and triggering the sending event to send the calculation result to the webpage front end based on the network connection.
In one embodiment, the task is registered in a scheduler; the method further comprises the following steps:
if the network connection is disconnected, then
Triggering a closing event to destroy the scheduler where the task required by the target webpage is located; the target webpage is a webpage corresponding to the network connection;
and ending the target task registered in the scheduler.
In one embodiment, the task trigger condition includes that target data corresponding to the data identification is updated;
the triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process to obtain a computing result, and the method comprises the following steps:
and if the target data corresponding to the data identification is updated, triggering and executing the back-end computing process through the task trigger, and computing the updated target data to obtain a computing result.
In one embodiment, the task trigger condition comprises reaching a preset trigger time condition;
the triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process to obtain a computing result, and the method comprises the following steps:
and if the preset triggering time condition is met, triggering and executing the back-end computing process through the task trigger, acquiring target data corresponding to the data identification, and performing computing processing to obtain a computing result.
In one embodiment, the method further comprises:
responding to a network connection request sent by a webpage front end, and establishing network connection with the webpage front end;
the acquiring of the data identifier and the corresponding task trigger condition sent by the front end of the webpage comprises the following steps:
acquiring a resource parameter list carried in the network connection request;
and analyzing the resource parameter list to obtain a data identifier and a corresponding task triggering condition.
In one embodiment, the method further comprises:
if the task trigger condition is met again, triggering and executing the back-end computing process again through the task trigger;
and sending the updated calculation result obtained by executing the back-end calculation process again to the front end of the webpage so that the front end of the webpage performs webpage updating display based on the updated calculation result.
In one embodiment, the web page of the front end of the web page includes different display areas, and the data identifier corresponds to the web page display area; the sending the calculation result to the webpage front end to enable the webpage front end to display the webpage based on the calculation result comprises:
and sending the calculation results of the back-end calculation flows corresponding to the data identification to a webpage front end so as to visually display the calculation results of the back-end calculation flows in corresponding display areas in the webpage running at the webpage front end.
A page display apparatus, the apparatus comprising:
the acquisition module is used for acquiring a data identifier sent by the front end of the webpage and a corresponding task trigger condition;
the construction module is used for constructing a back-end calculation flow corresponding to the data identification;
the generating module is used for generating a corresponding task trigger according to the task triggering condition;
the execution module is used for triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identification according to the back-end computing process to obtain a computing result;
and the sending module is used for sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end so as to enable the webpage front end to display the webpage based on the calculation result.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a data identifier and a corresponding task triggering condition sent by a webpage front end;
constructing a back-end computing flow corresponding to the data identification;
generating a corresponding task trigger according to the task trigger condition;
triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identification according to the back-end computing process to obtain a computing result;
and sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end, so that the webpage front end performs webpage display based on the calculation result.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a data identifier and a corresponding task triggering condition sent by a webpage front end;
constructing a back-end computing flow corresponding to the data identification;
generating a corresponding task trigger according to the task trigger condition;
triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identification according to the back-end computing process to obtain a computing result;
and sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end, so that the webpage front end performs webpage display based on the calculation result.
According to the page display method, the page display device, the computer equipment and the storage medium, after the data identification and the corresponding task trigger condition sent by the front end of the webpage are obtained, the corresponding task trigger is generated according to the task trigger condition, and the back end calculation flow corresponding to the data identification is constructed, so that the necessary program for calculating the calculation result required to be displayed by the front end of the webpage is obtained. The task trigger automatically triggers and executes the back-end computing process, so that the target data corresponding to the data identification can be computed according to the back-end computing process, after the computing process is finished, the computing result is actively pushed to the front end of the webpage based on network connection, and the front end of the webpage can timely acquire required data to display the corresponding webpage without waiting for the front end of the webpage to initiate a triggering operation, so that the real-time performance of webpage data display is effectively improved; meanwhile, time waste caused by waiting for acquiring a back-end calculation result by the front end of the webpage is avoided, and the efficiency of page display is effectively improved. In addition, the mode of actively pushing the calculation result data to the webpage front end avoids system pressure caused by the fact that the prior art needs to respond to the webpage front end to send a large amount of data acquisition requests in a centralized mode, so that abnormal situations such as webpage display jamming and delay cannot occur, and user experience is better.
Drawings
FIG. 1 is a diagram of an application environment of a page presentation method in one embodiment;
FIG. 2 is a flowchart illustrating a page display method according to an embodiment;
FIG. 3 is a flowchart illustrating the page display step in one embodiment;
FIG. 4 is a block diagram showing the structure of a page display apparatus in one embodiment;
FIG. 5 is a block diagram showing the construction of a page showing apparatus in another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The page display method provided by the application can be applied to the application environment shown in fig. 1. The web page front end 102 communicates with the server 104 in the background through a network connection. The server 104 acquires the data identifier and the corresponding task trigger condition sent by the webpage front end 102, constructs a back-end computing process corresponding to the data identifier, and generates a corresponding task trigger according to the task trigger condition. The server 104 triggers and executes a back-end computing process through the task trigger, so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process, and obtain a computing result. The server 104 sends the calculation result to the web page front end 102 based on the network connection pre-established with the web page front end 102, so that the web page front end 102 performs web page display based on the calculation result. The web page front end 102 is a client that displays a web page, and may specifically be a browser or a data visualization tool. The web front end 102 may be operated on various terminals such as a personal computer, a notebook computer, a smart phone, and a tablet computer, which is not limited herein. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, a page display method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step 202, acquiring a data identifier and a corresponding task trigger condition sent by the front end of the webpage.
The data identification is a mark uniquely corresponding to the target data. The target data is data stored in the server without being processed by calculation. It can be understood that after the calculation processing is performed on the target data, a calculation result of rendering and displaying the front end of the webpage can be obtained. The task trigger condition is a condition for triggering execution of a task. And the calculation result is obtained after the target data is calculated and processed by the back-end calculation process.
Specifically, the user may trigger the sending operation after configuring the data identifier and the corresponding task trigger condition. The web page front end can respond to the sending operation of the user and send the data identification and the corresponding task triggering condition to the server. The server can obtain the data identification and the corresponding task triggering condition sent by the front end of the webpage
In one embodiment, the user may trigger the sending operation after configuring the data identifier and the corresponding task triggering condition through a configuration page displayed at the front end of the web page. The web page front end can respond to the sending operation of the user and send the data identification and the corresponding task triggering condition to the server. The configuration page is a page for configuring the data identifier and the corresponding task trigger condition. It is understood that the user may also configure the update frequency of the area where the partial content of the web page presented at the front end of the web page is located on the configuration page, for example, update 1 time every 5 minutes, update 1 time every 1 hour, and so on.
In one embodiment, the user may configure the data identifier and the corresponding task trigger condition through a configuration page displayed by the browser, and then trigger the sending operation. The web page front end can respond to the sending operation of the user and send the data identification and the corresponding task triggering condition to the server. The server can trigger a receiving event to receive the data identification and the corresponding task triggering condition sent by the front end of the webpage. The receiving event is an operation of receiving data sent by the front end of the webpage.
And step 204, constructing a back-end computing flow corresponding to the data identification.
The back-end computing process is a processing step of computing target data by the server.
Specifically, after acquiring a data identifier sent by the front end of the webpage, the server constructs a back-end computing process corresponding to the data identifier.
In an embodiment, after the server obtains the data identifier sent by the front end of the acquired web page, according to the data identifier, a set good model corresponding to the data identifier may be searched for on the system server as a back-end calculation flow, or a plurality of data operators corresponding to the data identifier may be searched for on the system server and combined to obtain the back-end calculation flow, or a set good model corresponding to the data identifier may be searched for on the system server as the back-end calculation flow and a plurality of data operators and combined to obtain the back-end calculation flow. The data operator is an operation symbol for calculating target data.
And step 206, generating a corresponding task trigger according to the task trigger condition.
The task trigger is a program for triggering execution of a task.
Specifically, after acquiring the task trigger condition corresponding to the data identifier sent by the front end of the web page, the server generates a corresponding task trigger according to the task trigger condition.
In one embodiment, the task trigger condition may be that the task is triggered to be executed when a set frequency is reached, or that the task is triggered to be executed when target data is updated.
In one embodiment, the server may generate a task trigger that triggers execution of a task upon reaching a set frequency, or may generate a task trigger that triggers execution of a task upon update of the target data.
And 208, triggering and executing a back-end computing process through the task trigger, so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process, and obtaining a computing result.
Specifically, the server triggers execution of the back-end computing process through a task trigger. And the server executes the back-end calculation flow, and performs calculation processing on the target data corresponding to the data identification according to each processing step of the calculation flow to obtain a calculation result.
In an embodiment, the target data corresponding to the data identifier is subjected to calculation processing, the target data corresponding to the data identifier may be subjected to calculation processing by a set good model, the target data corresponding to the data identifier may be subjected to calculation processing after a plurality of data operators are combined, and the target data corresponding to the data identifier may be subjected to calculation processing by a combination of the set good model and the plurality of data operators.
Step 210, based on the pre-established network connection with the front end of the web page, sending the calculation result to the front end of the web page, so that the front end of the web page performs web page display based on the calculation result.
Therein, a network connection, in particular a Websocket connection (i.e. a web socket connection). Websocket is a protocol which can establish full-duplex communication connection only by one-time handshake.
Specifically, after the server executes the back-end calculation process and obtains the calculation result, the server may send the calculation result to the web page front end based on the network connection established in advance with the web page front end. And after the webpage front end acquires the received calculation result based on the network connection pre-established with the server, rendering and displaying the calculation result on the corresponding page.
In an embodiment, after the front end obtains the calculation result received based on the network connection pre-established with the server, the front end may refresh the calculation result to the corresponding area in the page according to the configuration of the update frequency of the user for the area where the partial content of the page displayed by the front end of the web page is located. If the update frequency is 0, the calculation result may not be refreshed to the area in the corresponding page.
In one embodiment, the web page is displayed in front of the web page based on the calculation result, which may be a data large-screen web page displayed in front of the web page based on the calculation result. The data large-screen webpage is a full-screen webpage displayed by a data visualization tool. A data visualization tool is a tool for representing data through a graphical design.
In the page display method, after the data identifier sent by the front end of the webpage and the corresponding task trigger condition are obtained, the corresponding task trigger is generated according to the task trigger condition, and a back end calculation flow corresponding to the data identifier is constructed, so that a necessary program for calculating the calculation result required to be displayed by the front end of the webpage is obtained. The task trigger automatically triggers and executes the back-end computing process, so that the target data corresponding to the data identification can be computed according to the back-end computing process, after the computing process is finished, the computing result is actively pushed to the front end of the webpage based on network connection, and the front end of the webpage can timely acquire required data to display the corresponding webpage without waiting for the front end of the webpage to initiate a triggering operation, so that the real-time performance of webpage data display is effectively improved; meanwhile, time waste caused by waiting for acquiring a back-end calculation result by the front end of the webpage is avoided, and the efficiency of page display is effectively improved. In addition, the mode of actively pushing the calculation result data to the webpage front end avoids system pressure caused by the fact that the prior art needs to respond to the webpage front end to send a large amount of data acquisition requests in a centralized mode, so that abnormal situations such as webpage display jamming and delay cannot occur, and user experience is better.
In one embodiment, constructing a back-end computing flow corresponding to the data identification includes: searching a data operator and target data corresponding to the data identifier; and combining the data operator and the target data according to the preset display form to obtain a back-end calculation flow matched with the preset display form.
The preset display form is a preset display form.
Specifically, after the data operator and the target data corresponding to the data identifier are found, the server combines the data operator and the target data according to a preset display form to obtain a back-end calculation flow matched with the preset display form. It can be understood that after the network connection is established between the web page front end and the server, a plurality of pieces of configuration information of the web page displayed by the web page front end, such as the data identifier, the task trigger condition corresponding to the data identifier, and the preset display form, may be sent to the server separately, may also be sent to the server together, and may also be sent to the server along with the network connection request in the network connection request by being bound.
In one embodiment, among a plurality of areas of a page displayed at the front end of a web page, each area displays a preset display form of content, which may be one or more of a line graph, a pie graph, a bar graph, and the like.
For example, the preset display form of the content displayed in one of the multiple regions of the page displayed at the front end of the web page is a pie chart, and after the server finds the data operator and the target data corresponding to the data identifier, the server combines the data operator and the target data to obtain a back-end calculation flow matched with the pie chart.
It can be understood that, if the preset display form is a line graph or a bar graph, after the data operator and the target data corresponding to the data identifier are found by the server, the data operator and the target data may be combined to obtain a back-end calculation flow matched with the line graph or the bar graph.
In one embodiment, the target data and the data operators may be stored together in one server or separately in different servers. For example, the data operators are stored in the system server, and the target data is stored in the service server.
In this embodiment, the server searches the data operator corresponding to the data identifier and the target data in advance and combines them to obtain a back-end calculation flow, so that the target data is calculated by the back-end calculation flow directly in the following process, thereby improving the efficiency of obtaining the calculation result.
In one embodiment, the method further comprises: forming a task by the task trigger, the back-end computing process and the sending event; triggering and executing a back-end computing process through a task trigger so as to perform computing processing on target data corresponding to the data identification according to the back-end computing process to obtain a computing result, wherein the computing result comprises the following steps: if the task triggering condition is met, triggering and executing the task through a corresponding task trigger, so as to perform calculation processing on target data corresponding to the data identifier according to a rear-end calculation flow in the task, obtain a calculation result and store the calculation result in a sending event; based on the network connection pre-established with the webpage front end, the method for sending the calculation result to the webpage front end comprises the following steps: and sending the calculation result to the front end of the webpage based on the network connection.
Wherein, sending an event is an operation of sending a calculation result.
Specifically, the server structure may compose the task trigger, the back-end computing process, and the sending event into a task after the back-end computing process is obtained and the corresponding task trigger is generated. And if the task triggering condition is met, the server triggers and executes the task through the corresponding task trigger, so that the target data corresponding to the data identifier is calculated according to the back-end calculation flow in the task, and the calculation result is obtained and stored in the sending event. When the back-end computing process is executed, the server can send the computing result to the front-end of the webpage based on network connection by triggering the sending event.
In one embodiment, the server may also send the calculation result to the front end of the web page in multiple times by triggering the sending event multiple times.
In one embodiment, the front end of the web page may receive the calculation result for multiple times, and after receiving the calculation result corresponding to the whole task, perform web page display based on the calculation result.
In this embodiment, the task trigger, the back-end computing process, and the sending event are combined into a task, and the server can autonomously trigger the sending event for different tasks to return a computing result corresponding to the task to the web page front end, and does not need to return a corresponding computing result to the web page front end after receiving a computing result request for different tasks sent by the web page front end, thereby improving the efficiency of the web page front end in obtaining the computing result.
In one embodiment, the tasks are registered in a scheduler; the method further comprises the following steps: if the network connection is disconnected, triggering a closing event to destroy a scheduler where a task required by the target webpage is located; the target webpage is a webpage corresponding to the network connection; and ending the target task registered in the scheduler.
The scheduler is a service for scheduling resources required for the calculation process. The close event is a close operation. Specifically, the operation of closing the front end of the web page, or the operation of closing the web page displayed at the front end of the web page, may disconnect the network connection. The target task is a task corresponding to the target web page.
Specifically, the server composes a task trigger, a back-end computing flow and a sending event into a task and registers the task in the scheduler. And if the network connection is disconnected, the server triggers a closing event, finds out and destroys the scheduler registered by the target task required by the target webpage corresponding to the disconnected network connection, so as to finish the target task registered in the scheduler.
In one embodiment, the web page front end may disconnect the network connection in response to a user trigger action directed to closing a page of the web page front end. The web page front end responds to the triggering operation of the user for disconnecting the network connection, and can also disconnect the network connection.
In one embodiment, the server triggers execution of the task through the corresponding task trigger, and schedules and allocates resources required to be used by the back-end computing process through the scheduler, so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process in the task and by using the resources allocated by scheduling, obtain a computing result, and store the computing result in the sending event. When the back-end computing process is executed, the server can send the computing result to the front-end of the webpage based on network connection by triggering the sending event.
In this embodiment, if the network connection is disconnected, the scheduler where the task required by the target webpage is located is destroyed, and the target task registered in the scheduler is finished, so that resources occupied by the target task can be effectively saved.
In one embodiment, the task triggering condition includes that target data corresponding to the data identification is updated; triggering and executing a back-end computing process through a task trigger so as to perform computing processing on target data corresponding to the data identification according to the back-end computing process to obtain a computing result, wherein the computing result comprises the following steps: and if the target data corresponding to the data identification is updated, triggering and executing a back-end computing process through the task trigger, and computing the updated target data to obtain a computing result.
Specifically, the server may listen whether the target data stored by the server is updated. If the target data corresponding to the data identifier is updated, the server can trigger execution of a back-end calculation process through the task trigger, and calculate the updated target data to obtain a calculation result so as to update the page of the front end of the webpage.
In one embodiment, the functions required by the server may be implemented using django and CDC, and the network connection between the front of the web page and the server may be implemented via channels. The CDC (Change Data Capture) is a lightweight timed task framework, and is configured to, when a task trigger condition is met, monitor whether target Data stored in the server is updated, and trigger execution of a task.
In this embodiment, when the target data is updated, the server may directly perform calculation processing on the updated target data by triggering the back-end calculation process to obtain a calculation result, so that the time for waiting for processing the page data is reduced, and the calculation processing efficiency is improved.
In one embodiment, the task trigger condition comprises reaching a preset trigger time condition; triggering and executing a back-end computing process through a task trigger so as to perform computing processing on target data corresponding to the data identification according to the back-end computing process to obtain a computing result, wherein the computing result comprises the following steps: and if the preset triggering time condition is met, triggering and executing a back-end computing process through the task trigger, acquiring target data corresponding to the data identifier and performing computing processing to obtain a computing result.
The preset trigger time condition is a preset trigger time condition. It is understood that the preset trigger time condition may be a preset trigger time point or a preset trigger time period.
Specifically, the user may set different preset trigger time conditions for different display areas of the web page at the front end of the web page. The server may determine whether a preset trigger time condition is reached. If the preset triggering time condition is met, the server can trigger execution of a back-end computing process through the task trigger, obtain target data corresponding to the data identification and perform computing processing to obtain a computing result, and the computing result is displayed in a corresponding display area in the front-end webpage.
In one embodiment, the preset trigger time condition is a preset trigger time point. And when the preset trigger time point is reached, the server triggers and executes a back-end calculation process through the task trigger, acquires target data corresponding to the data identifier and performs calculation processing to obtain a calculation result, so that the calculation result corresponding to the webpage is returned to the front end of the webpage to refresh the webpage.
It is understood that when the predetermined trigger time condition is a predetermined trigger time period. And when the preset trigger time period is reached, the server triggers and executes a back-end calculation process through the task trigger, acquires target data corresponding to the data identifier and performs calculation processing to obtain a calculation result, so that the calculation result corresponding to the webpage is returned to the front end of the webpage to refresh the webpage.
In one embodiment, the functions required by the server can be implemented by django and apschedule, and the network connection between the front of the web page and the server can be implemented by channels. Among them, django is a Web application framework of a software design mode of an open source MVT. MVT, Model, View and Template. Apschedule (advanced Python schedule), which is a lightweight timed task framework, is used to trigger execution of a task when a task trigger condition is met, such as a preset time point or a preset time period. Channels, a framework for processing requests instead of the original Django server. Channels contains receive events, transmit events, and close events.
In this embodiment, the corresponding display area in the webpage at the front end of the webpage is updated according to the preset update requirement of the user for the display areas of different webpages, so that the user can know the contents of different display areas of the webpage in a targeted manner.
In one embodiment, the method further comprises: responding to a network connection request sent by a webpage front end, and establishing network connection with the webpage front end; acquiring a data identifier and a corresponding task trigger condition sent by a webpage front end, wherein the task trigger condition comprises the following steps: acquiring a resource parameter list carried in a network connection request; and analyzing the resource parameter list to obtain a data identifier and a corresponding task triggering condition.
The resource parameter list is a list including resource parameters. The resource parameter is a basis for calculating the resources required by the calculation result. It can be understood that, in order to calculate the calculation result required to be displayed at the front end of the web page, a necessary program for calculating the calculation result required to be displayed at the front end of the web page needs to be obtained according to the resource parameters of the resource parameter list.
Specifically, the web page front end sends a network connection request to the server. The server responds to a network connection request sent by the webpage front end and establishes network connection with the webpage front end. And the server acquires and analyzes the resource parameter list carried in the network connection request to obtain the data identifier and the corresponding task triggering condition.
In one embodiment, the front end of the web page may send the resource parameter list to the server after establishing a network connection with the server. After the resource parameter list and the network connection request are sent to the server together, and the updated resource parameter list exists, the front end of the webpage can send the updated resource parameter list to the server.
In one embodiment, a user can configure the data identifier, the task trigger condition and the preset display form on a configuration page at the front end of the webpage, and then store the data identifier, the task trigger condition and the preset display form to obtain a resource parameter list. The user can configure the configuration page at the front end of the webpage according to actual requirements to obtain an updated resource parameter list.
In this embodiment, the web page front end may send the updated resource parameter list to the server for analysis by establishing a network connection with the web page front end, so as to obtain a corresponding calculation result returned by the server for update display.
In one embodiment, the method further comprises: if the task triggering condition is met again, triggering and executing the back-end computing process again through the task trigger; and sending the updated calculation result obtained by executing the back-end calculation process again to the front end of the webpage so that the front end of the webpage performs webpage updating display based on the updated calculation result.
Specifically, if the task triggering condition is satisfied again, the server triggers the execution of the back-end computing process again through the task trigger to obtain the updated computing result and triggers the sending event to return the updated computing result obtained by executing the back-end computing process again to the front end of the webpage, so that the front end of the webpage can obtain the updated computing result in time, and the updated webpage can be displayed in time.
In one embodiment, the front end of the webpage performs target data large-screen webpage updating display based on the updated calculation result.
In the embodiment, as long as the task trigger condition is met, the server autonomously triggers and executes the back-end computing process through the task trigger to obtain the updated computing result and pushes the updated computing result to the webpage front end, so that the computing result can be displayed on the webpage front end in real time without waiting for receiving a computing result obtaining request sent by the webpage front end, the waiting time is saved, and the situation that the computing result displayed by the webpage front end is delayed is avoided.
In one embodiment, the web page of the web page front end comprises different display areas, and the data identifier corresponds to the web page display area; the sending the calculation result to the webpage front end to enable the webpage front end to display the webpage based on the calculation result comprises: and sending the calculation results of the back-end calculation flows corresponding to the data identification to a webpage front end so as to visually display the calculation results of the back-end calculation flows in corresponding display areas in the webpage running at the webpage front end.
Specifically, the server sends the calculation results of each back-end calculation flow corresponding to the data identifier to the web page front end based on the network connection pre-established with the web page front end. And after the webpage front end obtains the calculation results, visually displaying each calculation result in a corresponding display area in the running webpage according to the data identification.
In one implementation, the web page that the web page front-end runs on is a data large screen web page. After the webpage front end obtains the calculation results, the visualization display of each calculation result in the corresponding display area of the running data large-screen webpage can be carried out according to the data identification.
In one implementation, the front end of the web page may visually display each calculation result in a corresponding display area in the running data large-screen web page in multiple types of diagrams, for example, in a pie chart, a bar chart, or a line chart, which is not limited herein.
In the embodiment, for the webpage needing high-frequency updating, the server actively pushes the calculation result to the front end of the webpage for real-time display after executing the calculation process, so that not only can the time waste caused by waiting for acquiring the calculation result of the rear end by the front end of the webpage be avoided, but also the system pressure caused by simultaneously responding to a large number of concentrated calculation result acquisition requests sent by the front end of the webpage in executing the calculation process can be avoided, and the display efficiency of the data large-screen webpage is improved.
In one embodiment, a page presentation step is shown in FIG. 3.
As shown in fig. 3, the front end of the web page sends a network connection request carrying a resource parameter list to the server. And after receiving the network connection request through the trigger receiving event, the server establishes network connection with the front end of the webpage. The server analyzes the data identifier of the network data from the resource parameter list and constructs a back-end computing process corresponding to the data identifier. The server analyzes the task trigger condition corresponding to each data identifier from the resource parameter list, for example, if the task is triggered to be executed every 5 minutes, the server generates a task trigger according to the task trigger condition, and generates a task trigger which triggers to be executed every 5 minutes. The server combines the task trigger, the back-end computing process and the sending event into a plurality of different tasks and registers the tasks in the scheduler.
If the task triggering condition is met, for example, the task is triggered to be executed every 5 minutes, the server can trigger the execution of the back-end computing process through the task trigger, obtain the target data corresponding to the data identifier and perform computing processing, obtain the computing result and trigger the sending event, so as to return the computing result to the front end of the webpage. The front end of the webpage monitors a calculation result sent by a network connection server, receives the calculation result and performs page rendering display. If the task triggering condition is met again, the server triggers and executes the back-end computing process again through the task trigger to obtain the updated computing result and triggers and sends the event so as to return the updated computing result obtained by executing the back-end computing process again to the front end of the webpage. And the front end of the webpage receives the updated calculation result to update and display the page.
And the server receives a request for closing the network connection sent by the front end of the webpage, destroys the scheduler and finishes the target task registered in the scheduler by triggering a closing event.
In the embodiment, the calculation result is automatically pushed to the front end of the webpage through the rear end, and the front end of the webpage automatically updates and displays the page according to the calculation result, so that the data effectiveness and the real-time performance of the data large-screen webpage are maintained.
It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in FIG. 4, there is provided a page displaying apparatus 400, comprising: an obtaining module 402, a constructing module 404, a generating module 406, an executing module 408, and a sending module 410, wherein:
an obtaining module 402, configured to obtain a data identifier sent by a web page front end and a corresponding task trigger condition.
A constructing module 404, configured to construct a back-end computing flow corresponding to the data identification.
And a generating module 406, configured to generate a corresponding task trigger according to the task trigger condition.
The execution module 408 is configured to trigger execution of a back-end computing process through the task trigger, so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process, and obtain a computing result.
The sending module 410 is configured to send the calculation result to the web page front end based on a network connection pre-established with the web page front end, so that the web page front end performs web page display based on the calculation result.
In one embodiment, the construction module 404 is further configured to find a data identifier corresponding to a data operator and a target data; and combining the data operator and the target data according to the preset display form to obtain a back-end calculation flow matched with the preset display form.
In one embodiment, the apparatus further comprises: a composition module 412, configured to compose a task from the task trigger, the back-end computing process, and the sending event; the execution module 408 is further configured to trigger execution of the task through a corresponding task trigger if the task trigger condition is met, so as to perform calculation processing on the target data corresponding to the data identifier according to a back-end calculation flow in the task, obtain a calculation result, and store the calculation result in the sending event; the sending module 410 is further configured to trigger a sending event to send the calculation result to the front end of the web page based on the network connection.
In one embodiment, the tasks are registered in a scheduler; as shown in fig. 5, the apparatus further comprises: a composition module 412 and a destruction module 414, wherein:
the destruction module 414 is configured to trigger a closing event if the network connection is disconnected, so as to destroy the scheduler where the task required by the target webpage is located; the target webpage is a webpage corresponding to the network connection; and ending the target task registered in the scheduler.
In one embodiment, the task triggering condition includes that target data corresponding to the data identification is updated; the execution module 408 is further configured to, if the target data corresponding to the data identifier is updated, trigger execution of a back-end calculation process through the task trigger, and calculate the updated target data to obtain a calculation result.
In one embodiment, the task trigger condition comprises reaching a preset trigger time condition; the execution module 408 is further configured to trigger execution of a back-end calculation process through the task trigger if a preset trigger time condition is met, obtain target data corresponding to the data identifier, and perform calculation processing to obtain a calculation result.
In one embodiment, the apparatus further comprises: responding to a network connection request sent by a webpage front end, and establishing network connection with the webpage front end; the obtaining module 402 is further configured to obtain a resource parameter list carried in the network connection request; and analyzing the resource parameter list to obtain a data identifier and a corresponding task triggering condition.
In an embodiment, the execution module 408 is further configured to trigger the execution of the back-end computing process again through the task trigger if the task trigger condition is satisfied again; and sending the updated calculation result obtained by executing the back-end calculation process again to the front end of the webpage so that the front end of the webpage performs webpage updating display based on the updated calculation result.
In one embodiment, the webpage at the front end of the webpage comprises different display areas, and the data identification corresponds to the webpage display area; the sending module 410 is further configured to send the calculation result of each back-end calculation flow corresponding to the data identifier to the web page front end, so that the calculation result of each back-end calculation flow is visually displayed in the corresponding display area in the web page running at the web page front end.
For the specific definition of the page displaying device, reference may be made to the above definition of the page displaying method, which is not described herein again. The various modules in the page display apparatus can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing page presentation data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a page presentation method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a page presentation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configurations shown in fig. 6 and 7 are merely block diagrams of portions of configurations related to aspects of the present application, and do not constitute limitations on the computing devices to which aspects of the present application may be applied, as particular computing devices may include more or less components than shown, or combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A page display method is characterized by comprising the following steps:
acquiring a data identifier and a corresponding task triggering condition sent by a webpage front end;
constructing a back-end computing flow corresponding to the data identification;
generating a corresponding task trigger according to the task trigger condition;
triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identification according to the back-end computing process to obtain a computing result;
and sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end, so that the webpage front end performs webpage display based on the calculation result.
2. The method of claim 1, wherein constructing a back-end computing flow corresponding to the data identifier comprises:
searching a data operator and target data corresponding to the data identifier;
and combining the data operator and the target data according to a preset display form to obtain the back-end calculation flow matched with the preset display form.
3. The method of claim 1, further comprising:
forming a task by the task trigger, the back-end computing process and the sending event;
the triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process to obtain a computing result, and the method comprises the following steps:
if the task triggering condition is met, triggering and executing the task through the corresponding task trigger, so as to perform calculation processing on target data corresponding to the data identifier according to the back-end calculation flow in the task, obtain a calculation result and store the calculation result in a sending event;
the sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end comprises:
and triggering the sending event to send the calculation result to the webpage front end based on the network connection.
4. The method of claim 3, wherein the task is registered in a scheduler; the method further comprises the following steps:
if the network connection is disconnected, then
Triggering a closing event to destroy the scheduler where the task required by the target webpage is located; the target webpage is a webpage corresponding to the network connection;
and ending the target task registered in the scheduler.
5. The method according to claim 1, wherein the task trigger condition includes that target data corresponding to the data identifier is updated;
the triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process to obtain a computing result, and the method comprises the following steps:
and if the target data corresponding to the data identification is updated, triggering and executing the back-end computing process through the task trigger, and computing the updated target data to obtain a computing result.
6. The method of claim 1, wherein the task trigger condition comprises reaching a preset trigger time condition;
the triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identifier according to the back-end computing process to obtain a computing result, and the method comprises the following steps:
and if the preset triggering time condition is met, triggering and executing the back-end computing process through the task trigger, acquiring target data corresponding to the data identification, and performing computing processing to obtain a computing result.
7. The method of claim 1, further comprising:
responding to a network connection request sent by a webpage front end, and establishing network connection with the webpage front end;
the acquiring of the data identifier and the corresponding task trigger condition sent by the front end of the webpage comprises the following steps:
acquiring a resource parameter list carried in the network connection request;
and analyzing the resource parameter list to obtain a data identifier and a corresponding task triggering condition.
8. The method according to any one of claims 1 to 7, further comprising:
if the task trigger condition is met again, triggering and executing the back-end computing process again through the task trigger;
and sending the updated calculation result obtained by executing the back-end calculation process again to the front end of the webpage so that the front end of the webpage performs webpage updating display based on the updated calculation result.
9. The method of claim 1, wherein the web page of the web page front end includes different presentation areas, and the data identifier corresponds to the web page presentation area; the sending the calculation result to the webpage front end to enable the webpage front end to display the webpage based on the calculation result comprises:
and sending the calculation results of the back-end calculation flows corresponding to the data identification to a webpage front end so as to visually display the calculation results of the back-end calculation flows in corresponding display areas in the webpage running at the webpage front end.
10. A page display apparatus, the apparatus comprising:
the acquisition module is used for acquiring a data identifier sent by the front end of the webpage and a corresponding task trigger condition;
the construction module is used for constructing a back-end calculation flow corresponding to the data identification;
the generating module is used for generating a corresponding task trigger according to the task triggering condition;
the execution module is used for triggering and executing the back-end computing process through the task trigger so as to perform computing processing on the target data corresponding to the data identification according to the back-end computing process to obtain a computing result;
and the sending module is used for sending the calculation result to the webpage front end based on the network connection pre-established with the webpage front end so as to enable the webpage front end to display the webpage based on the calculation result.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
CN202110441402.5A 2021-04-23 2021-04-23 Page display method and device, computer equipment and storage medium Pending CN113221039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110441402.5A CN113221039A (en) 2021-04-23 2021-04-23 Page display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110441402.5A CN113221039A (en) 2021-04-23 2021-04-23 Page display method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113221039A true CN113221039A (en) 2021-08-06

Family

ID=77088787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110441402.5A Pending CN113221039A (en) 2021-04-23 2021-04-23 Page display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113221039A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327933A (en) * 2021-12-01 2022-04-12 上海金仕达软件科技有限公司 Method, device and storage medium for realizing cross-platform workflow engine
CN115102895A (en) * 2022-07-14 2022-09-23 京东城市(北京)数字科技有限公司 Page rendering method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327933A (en) * 2021-12-01 2022-04-12 上海金仕达软件科技有限公司 Method, device and storage medium for realizing cross-platform workflow engine
CN115102895A (en) * 2022-07-14 2022-09-23 京东城市(北京)数字科技有限公司 Page rendering method, device, equipment and storage medium
CN115102895B (en) * 2022-07-14 2024-08-16 京东城市(北京)数字科技有限公司 Page rendering method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10210036B2 (en) Time series metric data modeling and prediction
CN109885624B (en) Data processing method, data processing device, computer equipment and storage medium
CN110688598B (en) Service parameter acquisition method and device, computer equipment and storage medium
CN110620812B (en) Interactive information pushing method and device, computer equipment and storage medium
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
CN109766253B (en) Performance data sending method and device, computer equipment and storage medium
CN104881273B (en) A kind of analysis method and terminal device of webpage rendering
CN106470110B (en) Method and device for sending messages to multiple users in user list in group mode
CN111176767B (en) Table data processing method, apparatus, computer device and storage medium
CN113221039A (en) Page display method and device, computer equipment and storage medium
US10380867B2 (en) Alert management within a network based virtual collaborative space
US20180159724A1 (en) Automatic task tracking
CN108052440B (en) Method, device, equipment and storage medium for correcting operation logic of business system
CN112000903B (en) Data query method and device, computer equipment and storage medium
CN111209310A (en) Service data processing method and device based on stream computing and computer equipment
CN110717647A (en) Decision flow construction method and device, computer equipment and storage medium
CN112051771B (en) Multi-cloud data acquisition method and device, computer equipment and storage medium
CN109426597B (en) Application performance monitoring method, device, equipment, system and storage medium
CN112817816B (en) Embedded point processing method and device, computer equipment and storage medium
US20160321173A1 (en) Automatic garbage collection thrashing monitoring
CN111901383A (en) Data request processing method and device, computer equipment and storage medium
CN112000403A (en) Information sending method and device, computer equipment and storage medium
CN112016027A (en) Method and device for monitoring access data operation platform
US11720476B2 (en) Automated end-to-end testing platform with dynamic container configuration
CN112688850B (en) Method and device for screening action objects in instant messaging

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination