Disclosure of Invention
The embodiment of the invention provides a webpage interaction system and a webpage interaction method, which can improve the updating efficiency of webpage information.
In a first aspect, an embodiment of the present invention provides a web page interaction system, including: the system comprises a server, a control end and at least one client; wherein,
the control terminal is used for acquiring an updating request and sending the updating request to the server terminal;
the server is used for determining webpage information corresponding to the updating request, determining a target client corresponding to the target identification information according to the target identification information carried in the updating request, and sending the webpage information to the target client;
and the target client in the at least one client is used for displaying the webpage information sent by the server.
Preferably, the first and second electrodes are formed of a metal,
the client comprises: a renderer and a content view; wherein,
the renderer is used for analyzing and rendering the webpage information when the webpage information is received, and sending the rendered webpage information to the content view;
and the content view is used for displaying the rendered webpage information in a webpage form.
Preferably, the first and second electrodes are formed of a metal,
the client further comprises: a verifier; wherein,
the verifier is used for determining whether the operating environment meets a preset environment standard value, receiving verification information of a user if the operating environment meets the preset environment standard value, and sending the verification information to the server; when connection information sent by the server is received, triggering the renderer to receive the webpage information;
and the server is used for determining pre-stored registration information corresponding to the user information according to the user information carried in the verification information, and sending the connection information to the verifier when the verification information is the same as the registration information.
Preferably, the first and second electrodes are formed of a metal,
the verifier is configured to determine a connection identifier of the server included in the connection information, determine whether the connection identifier matches a connection parameter carried in the verification information, and trigger the renderer to receive the web page information if the connection identifier matches the connection parameter.
Preferably, the first and second electrodes are formed of a metal,
the verifier is further used for sending receipt information to the server when the connection information is received;
the server is further used for constructing a connection relation table, and when the receipt information is received, the connection information is added into the connection relation table; and when the updating request is received, determining the target client according to the target identification information and the connection information in the connection relation table.
In a second aspect, an embodiment of the present invention provides a method for performing web page interaction by using a web page interaction system provided in any of the foregoing embodiments, where the method includes:
acquiring an updating request by using a control terminal;
determining webpage information corresponding to the updating request by using a server, and determining a target client corresponding to the target identification according to target identification information carried in the updating request;
and displaying the webpage information by using the target client.
Preferably, the first and second electrodes are formed of a metal,
the client comprises: a renderer and a content view;
the displaying the webpage information by using the target client comprises the following steps:
receiving the webpage information by using the renderer, and analyzing and rendering the webpage information;
and displaying the rendered webpage information in a webpage form by utilizing the content view.
Preferably, the first and second electrodes are formed of a metal,
the client further comprises: a verifier;
the receiving, with the renderer, the web page information includes:
determining whether the operating environment meets a preset environment standard value or not by using the verifier, and if so, receiving verification information of a user and sending the verification information to the server;
determining pre-stored registration information corresponding to the user information by using the server according to the user information carried in the verification information;
when the verification information is the same as the registration information, the connection information is sent to the verifier by using the server side;
and when the verifier receives the connection information, triggering the renderer to receive the webpage information.
Preferably, the first and second electrodes are formed of a metal,
when the verifier receives the connection information, triggering the renderer to receive the webpage information, including:
determining a connection identifier of the server side included in the connection information;
and determining whether the connection identifier is matched with the connection parameters carried in the verification information, and if so, triggering the renderer to receive the webpage information.
Preferably, the first and second electrodes are formed of a metal,
further comprising: constructing a connection relation table by using the server;
after the receiving of the connection information by the verifier, further comprising:
sending receipt information to the server by using the verifier;
when the server receives the receipt information, adding the connection information into the connection relation table;
the determining a target client corresponding to the target identification information according to the target identification information carried in the update request includes:
and determining the target client according to the target identification information and the connection information in the connection relation table.
The embodiment of the invention provides a webpage interaction system and a webpage interaction method. Therefore, when a user needs to update the display information of a plurality of webpages, the display information of a plurality of clients can be synchronously updated only by inputting corresponding update requests by using the control terminal without refreshing the webpages one by one, so that the update efficiency of the webpage information is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a web page interaction system, which may include: a server 101, a control end 102 and at least one client 103; wherein,
the control terminal 101 is configured to obtain an update request, and send the update request to the server;
the server 102 is configured to determine web page information corresponding to the update request, determine a target client corresponding to the target identification information according to target identification information carried in the update request, and send the web page information to the target client;
the target client in the at least one client 103 is configured to display the webpage information sent by the server.
In the above embodiment, the control end receives the update request, then the server determines the webpage information corresponding to the update request, determines the corresponding target client according to the target identification information carried in the update request, and displays the webpage information by using the target client. Therefore, when a user needs to update the display information of a plurality of webpages, the display information of a plurality of clients can be synchronously updated only by inputting corresponding update requests by using the control terminal without refreshing the webpages one by one, so that the update efficiency of the webpage information is improved.
As shown in fig. 2, in an embodiment of the present invention, the client 103 includes: a renderer 1031 and a content view 1032; wherein,
the renderer 1031 is configured to, when receiving the web page information, parse and render the web page information, and send the rendered web page information to the content view 1032;
the content view 1032 is used for displaying the rendered web page information in a web page form.
Here, the renderer may be written in JavaScript and the content views may be generated in html and css. The renderer mainly analyzes the webpage information sent by the server side and renders the related information to the content view. When a user starts to open a webpage, the webpage can be operated in a traditional mode, and at the moment, the renderer acquires a user instruction to perform conventional event triggering. After the webpage is opened, when the server sends webpage information again, the renderer analyzes and renders the content again, then the content view is used for updating and displaying, user triggering is not needed, the process is completely controlled by instruction data (webpage information) sent by the server, and therefore the effect of automatically achieving dynamic refreshing without operation is achieved on the user level. After the webpage information is rendered through the renderer, the rendered webpage information is displayed by utilizing the content view, the webpage information display effect is favorably improved, the user can conveniently check the webpage information, and therefore the user experience is improved.
In addition, the renderer may also process interactions occurring in the content view and execute related instructions of the server, for example, a blank form is displayed on the webpage a opened by the user for the first time, the webpage information displayed in the content view is a blank form, and the user fills corresponding form information in the blank form, that is, performs interactions through the content view. During the filling process of the user, the renderer renders the filled content, so that the user can check the filled form information during the filling process. After filling all the form information, the renderer can send the filled forms to the server for storage according to the storage instruction of the user.
As shown in fig. 3, in an embodiment of the present invention, the client 103 further includes: a verifier 1033; wherein,
the verifier 1033 is configured to determine whether the operating environment meets a preset environment standard value, and if so, receive verification information of the user and send the verification information to the server; when receiving the connection information sent by the server 102, triggering the renderer 1031 to receive the webpage information;
the server 102 is configured to determine, according to the user information carried in the verification information, pre-stored registration information corresponding to the user information, and send the connection information to the verifier 1033 when the verification information is the same as the registration information.
The verifier can also be written in JavaScript, and is a part used for performing security usable verification with the server, which can perform verification on a user, a device, a running environment, and the like. When the software is verified, whether the operating environment of the software meets a preset environment standard value is verified firstly, for example, in order to control the display process, the preset standard operating environment needs to support a fixed communication protocol, the operating software is the latest version, the verifier starts to check whether the operating environment of the verifier supports the fixed communication protocol or not and the operating software version is the latest version or not after being started, if the operating environment does not meet the environment standard value, a maintenance mode is started, the operating environment is updated, for example, when the software is not the latest version, prompt information is sent to a user so that the user updates the software. When the operating environment meets the environment standard value, the verification information input by the user is sent to the server, the server can determine whether to establish connection according to the verification information, when the verification information input by the user is the same as the prestored registration information, the server establishes connection with the client, once the connection is established, the connection is stored in real time, and the re-verification can be carried out as long as the connection is disconnected. And after the verification is successful, the verifier informs the renderer to receive the data and also informs the server to send the data. Therefore, the running environment, the user identity and the like are verified through the verifier, the safety of webpage information transmission is guaranteed, the situations of data stealing or loss and the like are effectively avoided, and the interaction experience of the user is further improved.
In an embodiment of the present invention, the verifier 1033 is configured to determine a connection identifier of the server included in the connection information, determine whether the connection identifier matches a connection parameter carried in the verification information, and trigger the renderer to receive the web page information if the connection identifier matches the connection parameter.
After the server determines that the client passes the verification, that is, after the verification information sent by the client is the same as the registration information, the server sends initial data, that is, connection information, to the client establishing the connection, where the connection information may include a connection identifier corresponding to the server, an additional initialization instruction to be executed, or initial content to be displayed. When the verifier of the client receives the connection information, the verifier determines whether the connection identifier is matched with the connection parameter received by the verifier, executes an initialization instruction when the connection identifier is matched with the connection parameter received by the verifier, and triggers the renderer to analyze initial data so as to render initial content into a content view for display. For example, the connection information sent by the server to the client a is received by the client B, and at this time, because the connection identifier in the connection information does not match the connection parameter of the client B, the client B will refuse to execute the instruction sent by the server, and at the same time, notify the server of the event. Therefore, the server and the client perform double-sided verification according to the verification information and the connection information, so that the correct connection relation between the server and the client is ensured, the accurate display of webpage information is facilitated, and the interaction experience of a user is further improved.
In an embodiment of the present invention, the verifier 1033 is further configured to send receipt information to the server when receiving the connection information;
the server 102 is further configured to construct a connection relation table, and when receiving the receipt information, add the connection information to the connection relation table; and when the updating request is received, determining the target client according to the target identification information and the connection information in the connection relation table.
For ease of presentation, a user accesses a client's web page, typically on a large screen display device. And the client performs corresponding verification, after the verification is passed, the verification information containing the unique ID is sent to the server for verification, and the server can establish real-time connection by using a WebSocket protocol after the verification is passed.
After establishing real-time connection through a WebSocket protocol, the server side adds the unique ID to the connection information when sending the connection information to the client side, so that the client side can confirm again. Meanwhile, the server side can maintain a multi-terminal connection relation table reflecting the current connection through the unique ID, namely, the plurality of client sides connected with the server side at present can be determined through the unique ID, and then the relation between the client sides and the control side can be determined according to the connection relation between the control side and the server side, so that data can be sent to each client side in a directional mode. Since a real-time connection is established, the server can ensure that the end-to-end of the established connection is uniquely determined through the connection relation table. Therefore, the server is a bridge connecting the control end and the client end and connecting the client end and the client end, and is responsible for authentication, relationship maintenance, real-time communication and providing functions (storage, uploading, downloading and the like) of a conventional web server.
In order to facilitate user operation, the control end webpage can be operated through a PC (personal computer), a tablet personal computer or a smart phone. In order to maintain the real-time control of the control end, the control end should establish a connection with the server end before the client end, and if the control end is not connected, the client end should wait. When the control end page corresponding to the client end is also connected with the server end in real time through similar verification, the server end updates the connection relation table, the control end is confirmed to be on line, and the client end can start to receive data. Therefore, the connection relation between the control terminal and the client terminal and the server terminal are maintained through the connection relation table, so that the target client terminal for receiving the webpage information can be conveniently and accurately determined, and the updating efficiency of the webpage information can be further improved.
In addition, the control end can also edit document contents or slides and the like, and can send edited content data to the server end for storage, when the control end is used, the edited content data can be sent to the client end at any time through the server end, meanwhile, the client end can control the display of the client end contents in real time, the effects of up-down rolling, up-down page turning and the like can be realized, and some common functions can be developed into the forms of buttons and the like through compiling HTML and JavaScript codes in advance, so that when a user operates, the user can directly click corresponding function buttons on the mobile equipment, and the operation of the user is facilitated.
When the control side page finishes editing the data to be sent, the receiving clients, that is, the target clients, may be designated, and these target clients may be some specific clients or all clients. At the moment, the server side can send data to the appointed client side through the maintained end-to-end connection relation table, the client side page analyzes and renders the received data, and corresponding instructions are executed to display the rendered data. The control end can send data to the webpage of the client end in real time and can receive some information from different client ends in real time, so that interaction among the client ends is realized, and the client ends can communicate in the same mode while carrying out traditional webpage interaction, namely one client end is regarded as the control end, and the client end receiving the data is changed into a controlled end, so that more complex interaction of multiple webpage ends can be realized. In the process, all data are sent and updated in real time, so that dynamic interactive display of the multi-end webpage can be realized.
As shown in fig. 4, an embodiment of the present invention provides a method for performing web page interaction by using a web page interaction system provided in any of the foregoing embodiments, where the method includes the following steps:
step 401: acquiring an updating request by using a control terminal;
step 402: determining webpage information corresponding to the updating request by using a server, and determining a target client corresponding to the target identification according to target identification information carried in the updating request;
step 403: and displaying the webpage information by using the target client.
In one embodiment of the present invention, the client includes: a renderer and a content view;
specific embodiments of step 403 may include:
receiving the webpage information by using the renderer, and analyzing and rendering the webpage information;
and displaying the rendered webpage information in a webpage form by utilizing the content view.
In an embodiment of the present invention, the client further includes: a verifier;
the receiving, with the renderer, the web page information includes:
determining whether the operating environment meets a preset environment standard value or not by using the verifier, and if so, receiving verification information of a user and sending the verification information to the server;
determining pre-stored registration information corresponding to the user information by using the server according to the user information carried in the verification information;
when the verification information is the same as the registration information, the connection information is sent to the verifier by using the server side;
and when the verifier receives the connection information, triggering the renderer to receive the webpage information.
In an embodiment of the present invention, the triggering the renderer to receive the web page information when the verifier receives the connection information includes:
determining a connection identifier of the server side included in the connection information;
and determining whether the connection identifier is matched with the connection parameters carried in the verification information, and if so, triggering the renderer to receive the webpage information.
In one embodiment of the present invention, the method may further comprise: constructing a connection relation table by using the server;
after the receiving of the connection information by the verifier, further comprising:
sending receipt information to the server by using the verifier;
when the server receives the receipt information, adding the connection information into the connection relation table;
specific embodiments of step 402 may include:
and determining the target client according to the target identification information and the connection information in the connection relation table.
Because the information interaction, execution process and other contents among the steps in the method are based on the same concept as the system embodiment of the present invention, specific contents can be referred to the description in the system embodiment of the present invention, and are not described herein again.
An embodiment of the present invention further provides a readable medium, which includes an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes a method provided in any one of the above embodiments of the present invention.
An embodiment of the present invention further provides a storage controller, including: a processor, a memory, and a bus; the memory is used for storing execution instructions, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instructions stored in the memory, so that the storage controller executes the method provided by any one of the above embodiments of the invention.
In summary, the above embodiments of the present invention have at least the following advantages:
1. in the embodiment of the invention, the control terminal receives the updating request, then the server determines the webpage information corresponding to the updating request, determines the corresponding target client terminal according to the target identification information carried in the updating request, and displays the webpage information by using the target client terminal. Therefore, when a user needs to update the display information of a plurality of webpages, the display information of a plurality of clients can be synchronously updated only by inputting corresponding update requests by using the control terminal without refreshing the webpages one by one, so that the update efficiency of the webpage information is improved.
2. In the embodiment of the invention, the webpage information is rendered by using the renderer in the client, and then the rendered webpage information is displayed in a webpage form through the content view, so that the display effect of the webpage information is improved, the webpage information is convenient for a user to view, and the user experience is improved.
3. In the embodiment of the invention, the operation environment is verified through the verifier in the client, and when the operation environment meets the preset environment standard value, the server determines whether the verification information of the user is the same as the pre-stored registration information or not, and the renderer is triggered when the verification information is the same as the pre-stored registration information. Therefore, the running environment, the user identity and the like are verified through the verifier, the safety of webpage information transmission is guaranteed, the situations of data stealing or loss and the like are effectively avoided, and the interaction experience of the user is further improved.
4. In the embodiment of the invention, when the verifier determines that the connection identifier sent by the server side is matched with the received connection parameter, the renderer is triggered to receive the webpage information. Therefore, the server and the client perform double-sided verification according to the verification information and the connection information, so that the correct connection relation between the server and the client is ensured, the accurate display of webpage information is facilitated, and the interaction experience of a user is further improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.