CN115988082A - Interaction method, terminal, server, device, equipment and storage medium - Google Patents

Interaction method, terminal, server, device, equipment and storage medium Download PDF

Info

Publication number
CN115988082A
CN115988082A CN202211660351.6A CN202211660351A CN115988082A CN 115988082 A CN115988082 A CN 115988082A CN 202211660351 A CN202211660351 A CN 202211660351A CN 115988082 A CN115988082 A CN 115988082A
Authority
CN
China
Prior art keywords
request
terminal
response data
unit
server
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.)
Withdrawn
Application number
CN202211660351.6A
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.)
Apollo Intelligent Connectivity Beijing Technology Co Ltd
Original Assignee
Apollo Intelligent Connectivity Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Intelligent Connectivity Beijing Technology Co Ltd filed Critical Apollo Intelligent Connectivity Beijing Technology Co Ltd
Priority to CN202211660351.6A priority Critical patent/CN115988082A/en
Publication of CN115988082A publication Critical patent/CN115988082A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides an interaction method, a terminal, a server, a device, equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of information interaction. The specific implementation scheme is as follows: the terminal service processing unit sends a request to a request processing arbitration unit; the request processing arbitration unit judges whether response data corresponding to the request is stored in the terminal storage unit or not to obtain a first judgment result; if the first judgment result is yes, the triggering request scheduling unit takes out the response data from the terminal storage unit and sends the response data to the terminal service processing unit; if the first judgment result is negative, sending the request to the server and receiving response data returned by the server; and storing the response data to the terminal storage unit according to the request scheduling unit, and sending the response data to the terminal service processing unit. The interaction method, the terminal, the server, the device, the equipment and the storage medium can improve the efficiency of request response.

Description

Interaction method, terminal, server, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an interaction method, a terminal, a server, an apparatus, a device, and a storage medium in the field of information interaction technologies.
Background
In the prior art, the interaction process between the terminal and the server is generally as follows: after the terminal establishes network connection with the server, the terminal directly encapsulates the request and sends the encapsulated request to the server, the server processes the request sent by the terminal to obtain a response result, and the response result is returned to the terminal, namely, each request of the terminal triggers network transmission and server response.
Disclosure of Invention
The disclosure provides an interaction method, a terminal, a server, a device, equipment and a storage medium for improving request response efficiency.
According to an aspect of the present disclosure, an interaction method is provided, which is applied to a terminal, where the terminal includes a terminal service processing unit, a request processing arbitration unit, a request scheduling unit, and a terminal storage unit, and the method includes: the terminal service processing unit sends a request to the request processing arbitration unit; the request processing arbitration unit judges whether response data corresponding to the request is stored in the terminal storage unit or not to obtain a first judgment result; if the first judgment result is yes, triggering the request scheduling unit to take the response data out of the terminal storage unit and send the response data to the terminal service processing unit; if the first judgment result is negative, sending the request to a server and receiving the response data returned by the server; and storing the response data to the terminal storage unit according to the request scheduling unit, and sending the response data to the terminal service processing unit.
According to another aspect of the present disclosure, an interaction method is provided, which is applied to a server, where the server includes a server service processing unit, a request response arbitration unit, and a server storage unit, and the method includes: the request response arbitration unit receives a request from a terminal and judges whether response data corresponding to the request is stored in the server storage unit; and if so, taking the response data out of the server storage unit and sending the response data to the terminal.
According to another aspect of the present disclosure, there is provided a terminal including: the terminal service processing unit is connected with the request processing arbitration unit, the request processing arbitration unit is connected with the request scheduling unit, and the request scheduling unit is connected with the terminal storage unit; the terminal storage unit comprises a terminal memory and a terminal disk area, the terminal memory is connected with the request scheduling unit, and the terminal disk area is connected with the terminal memory; the terminal service processing unit is used for sending a request to the request processing arbitration unit and processing the service in the terminal according to the response data corresponding to the request; the request processing arbitration unit is used for judging whether the response data is stored in the terminal storage unit; the request scheduling unit comprises a request scheduling process and is used for scheduling the request and the response data; and the terminal storage unit is used for storing the response data.
According to another aspect of the present disclosure, there is provided a server, including: the system comprises a server service processing unit, a request response arbitration unit and a server storage unit, wherein the request response arbitration unit is connected with the server service processing unit, and the server service processing unit is connected with the server storage unit; the server service processing unit is used for responding to the request sent by the terminal and generating a response strategy; the request response arbitration unit is used for judging whether response data corresponding to the request is stored in the server storage unit; and the server storage unit is used for storing the response data.
According to another aspect of the present disclosure, an interactive apparatus is provided, which is applied to a terminal including a terminal service processing unit, a request processing arbitration unit, a request scheduling unit, and a terminal storage unit, the apparatus including: a first sending module, configured to send a request to the request processing arbitration unit by the terminal service processing unit; the first judgment module is used for judging whether response data corresponding to the request is stored in the terminal storage unit by the request processing arbitration unit to obtain a first judgment result; the first feedback module is used for triggering the request scheduling unit to take the response data out of the terminal storage unit and send the response data to the terminal service processing unit if the first judgment result is yes; the second sending module is used for sending the request to a server side and receiving the response data returned by the server side if the first judgment result is negative; and the second feedback module is used for storing the response data to the terminal storage unit according to the request scheduling unit and sending the response data to the terminal service processing unit.
According to another aspect of the present disclosure, an interactive apparatus is provided, which is applied to a server, where the server includes a server service processing unit, a request response arbitration unit, and a server storage unit, and the apparatus includes: the second receiving module is used for receiving the request from the terminal by the request response arbitration unit; the second judging module is used for judging whether response data corresponding to the request is stored in the server storage unit; and the third feedback module is used for taking the response data out of the server storage unit and sending the response data to the terminal if the judgment result is yes.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of the present disclosure.
The interaction method, the terminal, the server, the device, the equipment and the storage medium can improve the efficiency of request response and effectively reduce the flow consumption caused by repeated requests.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flow chart diagram of an interaction method according to a first embodiment of the present disclosure;
fig. 2 is a schematic flow chart diagram of an interaction method according to a sixth embodiment of the present disclosure;
fig. 3 is a schematic flow chart diagram of an interaction method according to a seventh embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an application scenario of an interaction method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an interaction device according to an eleventh embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an interaction device according to a twelfth embodiment of the present disclosure;
FIG. 7 is a block diagram of an electronic device for implementing an interaction method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic flowchart of an interaction method according to a first embodiment of the present disclosure, as shown in fig. 1, the method is applied to a terminal, the terminal includes a terminal service processing unit, a request processing arbitration unit, a request scheduling unit, and a terminal storage unit, and the method mainly includes:
step S101, the terminal service processing unit sends a request to the request processing arbitration unit.
Step S102, the request processing arbitration unit judges whether the response data corresponding to the request is stored in the terminal storage unit, and a first judgment result is obtained.
Step S103, if the first judgment result is yes, the trigger request dispatching unit takes out the response data from the terminal storage unit and sends the response data to the terminal service processing unit.
Step S104, if the first judgment result is negative, sending the request to the server and receiving response data returned by the server; and storing the response data to the terminal storage unit according to the request scheduling unit, and sending the response data to the terminal service processing unit.
In this embodiment, after encapsulating the request, the terminal service processing unit sends the request to the request processing arbitration unit, and the request processing arbitration unit determines whether response data corresponding to the request is stored in the terminal storage unit, so as to obtain a first determination result, where if the first determination result is yes, the request scheduling unit is triggered to take out the response data corresponding to the request from the terminal storage unit and send the response data to the terminal service processing unit; if the first judgment result is negative, sending the request to the server and receiving response data returned by the server; and storing the response data to the terminal storage unit according to the request scheduling unit, and sending the response data to the terminal service processing unit.
In the prior art, when a terminal needs to acquire response data of a request, the request needs to be packaged and then directly sent to a server, the server responds to the request and generates response data, and then the server returns the response data to the terminal, so that network transmission and server response are triggered by each request of the terminal, if the terminal sends a large number of requests to the server in a short time, the response speed of the request is slowed, and if a large number of repeated requests exist in the requests sent by the terminal to the server, invalid traffic consumption is caused due to the repeated requests.
In this embodiment, a terminal storage unit is arranged in a terminal, the terminal storage unit stores response data after a server returns response data corresponding to a certain request for the first time, a terminal service processing unit encapsulates the request, does not send the request to the server, but sends the request to a request processing arbitration unit for judgment, if the response data corresponding to the request is stored in the terminal storage unit, the request processing arbitration unit triggers a request scheduling unit to take out the response data corresponding to the request from the terminal storage unit and send the response data to the terminal service processing unit, so that for the request of which the corresponding response data is stored in the terminal storage unit, the request does not need to be sent to the server for response, the response data corresponding to the request is directly searched from the terminal storage unit and returned to the terminal service processing unit, thereby speeding up the response speed of the request and avoiding invalid traffic consumption caused by repeated requests; if the response data corresponding to the request is not stored in the terminal storage unit, the server needs to respond to the request and generate response data at this time, so the request processing arbitration unit sends the request to the server, receives the response data returned by the server for the request, then triggers the request scheduling unit, stores the response data in the terminal storage unit, and sends the response data to the terminal service processing unit. In an implementation manner, the request processing arbitration unit may determine whether response data corresponding to the request is stored in the terminal storage unit through the request scheduling unit, and specifically, after receiving the request sent by the terminal service processing unit, the request processing arbitration unit may trigger the request scheduling unit to search the terminal storage unit for the response data corresponding to the request, so as to determine whether the response data corresponding to the request is stored in the terminal storage unit.
In an implementation manner, before sending the request to the server, the terminal needs to establish a connection with the server, for example, a three-way handshake connection is performed with the server through a Transmission Control Protocol (TCP), and after the connection is established, the terminal may send the request to the server, and after receiving response data returned by the server, close the connection established with the server.
In an implementation manner, after the terminal receives response data returned by the server, the request processing arbitration unit triggers the request scheduling unit, the request scheduling unit stores the response data in the terminal storage unit, and the request scheduling unit can directly search the response data corresponding to the request in the terminal storage unit for the same request within a request aging range or a request frequency range specified by a response policy, and return the response data to the terminal service processing unit.
In the first embodiment of the present disclosure, a terminal service processing unit sends a request to a request processing arbitration unit, the request processing arbitration unit determines whether response data corresponding to the request is stored in a terminal storage unit, and obtains a first determination result, if the first determination result is yes, a request scheduling unit is triggered to take out the response data corresponding to the request from the terminal storage unit and send the response data to the terminal service processing unit, that is, for part of requests, the request does not need to be sent to a server for responding, and the response data corresponding to the request is directly searched from the terminal storage unit and returned to the terminal service processing unit, so that the response speed of the request can be increased, and invalid traffic consumption caused by repeated requests is avoided; and in addition, the response data returned by the server are stored, and the request scheduling unit can directly search the response data corresponding to the request in the terminal storage unit, so that the response speed of the request is accelerated.
In the second embodiment of the present disclosure, step S102 specifically includes:
the request processing arbitration unit triggers the request scheduling unit to acquire the state information corresponding to the request; and the request processing arbitration unit judges whether the response data corresponding to the request is stored in the terminal storage unit according to the response strategy and the state information.
In this embodiment, after receiving a request sent by a terminal service processing unit, a request processing arbitration unit triggers a request scheduling unit, and the request scheduling unit obtains status information corresponding to the request, where the status information includes time for sending the request, the number of times of the request, and the like.
In a third embodiment of the present disclosure, determining whether response data corresponding to a request is stored in a terminal storage unit according to a response policy and status information includes:
judging whether the request is a primary request or not according to the request frequency in the state information to obtain a second judgment result; if the second judgment result is yes, the corresponding response data is not stored in the terminal storage unit; if the second judgment result is negative, judging whether the state information meets the response strategy or not to obtain a third judgment result; if the third judgment result is yes, the corresponding response data is requested to be stored in the terminal storage unit; and if the third judgment result is negative, the corresponding response data is not stored in the terminal storage unit.
In this embodiment, the response policy may include a request aging range, a request frequency range, and the like, where the request aging range is used to indicate a time range in which the requested response data can be reused; the request frequency range is used to indicate a frequency range in which the requested response data can be multiplexed, and the request scheduling unit may clear the response data in the terminal storage unit according to the response policy, for example, if the response policy specifies that the request time range is 60 seconds, the request scheduling unit may clear the response data corresponding to the request from the terminal storage unit after 60 seconds in which the request is first sent; if the response policy specifies that the request frequency range is 100 times, the response data corresponding to the request may be cleared from the terminal storage unit after the request is issued 100 times. Therefore, after the request processing arbitration unit obtains the status information corresponding to the request, if the status information indicates that the request is not sent for the first time, the request processing arbitration unit may calculate a time difference between the time when the request is sent and the time when the request is sent for the first time, and if the time difference is within a request aging range, the response data corresponding to the request is stored in the terminal storage unit; the request processing arbitration unit may compare the number of times of the request indicated by the status information with the request frequency range, and if the number of times of the request is smaller than the request frequency range, the response data corresponding to the request is stored in the terminal storage unit. Of course, if the status information shows that the request is sent for the first time, it is proved that the request has not been responded, and therefore, the response data corresponding to the request is not stored in the terminal storage unit.
In the second and third embodiments of the present disclosure, after receiving a request sent by a terminal service processing unit, a request processing arbitration region triggers a request scheduling unit to obtain state information corresponding to the request, and the request processing arbitration region can determine whether response data corresponding to the request is stored in a terminal storage unit according to a response policy and the state information, so that the request processing arbitration region can directly determine whether response data corresponding to the request is stored in the terminal storage unit, and then perform different processing on the request according to a determination result, and it is not necessary to wait for the request scheduling unit to perform subsequent processing on the request after traversing and searching the terminal storage unit, thereby improving the determination efficiency and further improving the request response speed.
In a fourth embodiment of the present disclosure, a terminal storage unit includes a terminal memory and a terminal volume, and the scheduling unit is configured to store response data in the terminal storage unit according to a request, including: storing the response data to a terminal memory according to the request scheduling unit; and mapping the response data to the terminal disk area by the terminal memory.
In this embodiment, after the terminal receives the response data returned by the server, the request processing arbitration region triggers the request scheduling unit to store the response data in the terminal memory, and the terminal memory can map the response data to the terminal disk region. Specifically, the request scheduling unit may store the request and the response data corresponding to the request in the terminal memory in a one-to-one correspondence manner, and the data mapping between the terminal memory and the terminal disk region may be performed by using an existing method, which is not described herein again.
In a fifth embodiment of the present disclosure, the response policy includes: request aging range, request frequency range, request sequence and storage area size; the method further comprises the following steps:
receiving a response strategy sent by a server, and; and clearing the response data from the terminal storage unit according to the response strategy.
In this embodiment, the response policy may include a request aging range, a request frequency range, a request sequence, a storage size, and the like, where the request sequence is used to indicate a position of the request in the request queue, the storage size is used to indicate a size of a storage unit of the terminal, and the response policy may be maintained by the terminal itself, for example, the terminal sets the request aging range, the request frequency range, the storage size, and the like by itself according to an actual situation; the response policy may also be maintained by the server, for example, the server may adjust the response policy according to a load condition of the server or an update condition of the response data, and send the adjusted response policy to the terminal, and the terminal receives the response policy sent by the server and starts to execute the adjusted response policy.
In one possible embodiment, the response data may be purged from the terminal storage unit according to the following: and judging whether the request corresponding to the response data meets the response strategy or not to obtain a fourth judgment result, and if the fourth judgment result is negative, clearing the response data from the terminal storage unit. Specifically, if the request corresponding to the response data does not satisfy the response policy, the response policy corresponding to the request may be invalid, and therefore, the response policy needs to be cleared from the terminal storage unit. For example, if the request aging range is 60 seconds, the terminal will clear the response data corresponding to the request from the terminal storage unit after the request is sent for 60 seconds for the first time; if the request frequency range is 100 times, the terminal will clear the response data corresponding to the request from the terminal storage unit after the request is sent out for 100 times; if the size of the terminal memory specified by the response policy is 1GB (gigabytes), the response data stored in the terminal memory at the earliest time can be cleared according to the size of the data stored in the terminal memory.
In an implementation manner, since the speed of reading the response data from the terminal memory is faster than the speed of reading the response data from the terminal volume, and the capacity of the terminal memory is generally much smaller than that of the terminal volume, the terminal will clear the response data in the terminal memory according to the size of the data stored in the terminal memory, if the response data corresponding to a request is stored in the terminal storage unit, the request scheduling unit will first obtain the response data in the terminal memory, and if the response data corresponding to the request is not stored in the terminal memory, the request scheduling unit will obtain the response data from the terminal volume.
In the fifth embodiment of the present disclosure, the terminal receives the response policy sent by the server, and clears the response data from the terminal storage unit according to the response policy, which can ensure that the response data that cannot be multiplexed is cleared from the terminal storage unit, and avoid occupation of the terminal storage unit by invalid response data.
Fig. 2 is a flowchart illustrating an interaction method according to a sixth embodiment of the present disclosure, as shown in fig. 2, the method is applied to a server, the server includes a server service processing unit, a request response arbitration unit, and a server storage unit, and the method includes:
in step S201, the request response arbitration unit receives a request from a terminal, and determines whether response data corresponding to the request is stored in the server storage unit.
And S202, taking the response data out of the server storage unit and sending the response data to the terminal if the judgment result is yes.
In this embodiment, the request response arbitration unit of the server receives the request from the terminal and determines whether response data corresponding to the request is stored in the server storage unit, and specifically, the server service processing unit stores the generated response data in the server storage unit after responding to the request sent by the terminal, and the server storage unit generally includes a magnetic disk and can store the response data for a long time.
In an embodiment, after receiving the request from the terminal, the request-response arbitration unit records the status of the request, for example, the time when the request is received and whether the request is successfully responded, so that the request-response arbitration unit can directly determine whether the response data corresponding to the request is stored in the server storage unit according to the status of the request.
Fig. 3 is a flowchart illustrating an interaction method according to a seventh embodiment of the disclosure, as shown in fig. 3, the method further includes:
and step S203, if the judgment result is negative, the request is sent to the service end service processing unit.
And step S204, the service processing unit of the service end responds to the request to obtain response data.
And step S205, storing the response data to the server storage unit and sending the response data to the terminal.
In this embodiment, if the request response arbitration unit determines that the response data corresponding to the request is not stored in the server storage unit, the request is sent to the server service processing unit, the server service processing unit responds to the request to generate the response data corresponding to the request, and then the request and the response data are stored in the server storage unit correspondingly, and the response data are sent to the terminal. Specifically, the service processing unit at the service end may respond to the request according to a format of the request, and the like, where the responding process is the prior art and is not described herein again.
In the sixth and seventh embodiments of the present disclosure, after the request-response arbitration unit receives a request from a terminal, when it is determined that response data corresponding to the request is stored in the server storage unit, the request-response arbitration unit directly takes out the response data from the server storage unit and returns the response data to the terminal; and when judging that the response data corresponding to the request is not stored in the server storage unit, sending the request to the server service processing unit for response, storing the generated response data in the server storage unit, and then sending the response data to the terminal. Therefore, the server does not need to respond to the already responded request again, and only needs to take out the stored response data from the server storage unit and send the response data to the terminal, so that the load of the server is reduced, and the response speed to the request is improved.
In an eighth embodiment of the present disclosure, the method further comprises:
if the response data is changed, the service end service processing unit generates a response strategy according to the request; and sending the response strategy to the terminal.
In this embodiment, after the service-side service processing unit responds to the request and sends the response data corresponding to the request to the terminal, if the service-side service processing unit actively initiates a change of the response data within a request aging range or a request frequency range specified by the response policy, that is, if the response data corresponding to the request is different from the response data already sent to the terminal due to a change of the internal data of the service side, the service-side service processing unit regenerates the response policy according to the request and sends the response policy to the terminal.
In an eighth embodiment of the present disclosure, if the response data is changed, the service processing unit generates a response policy according to the request, and sends the response policy to the terminal to replace the previous response policy, so that the next time the request is sent to the service to respond, and the changed response data is obtained again, which can avoid the problem that the terminal service processing unit obtains wrong response data due to the change of the response data requested in the range specified by the previous response policy.
Fig. 4 is a schematic view of an application scenario of an interaction method according to an embodiment of the present disclosure, and as shown in fig. 4, the method is mainly applied to a scenario in which a terminal interacts with a server, where the terminal includes: the system comprises a terminal service processing unit B1, a request processing arbitration unit A1, a request scheduling unit T and a terminal storage unit E, wherein the terminal storage unit E comprises a terminal memory C and a terminal disk area D1; the server side comprises: a service end service processing unit B2, a request response arbitration unit A2 and a service end storage unit D2.
The interaction process of the terminal and the server in the embodiment of the disclosure is as follows:
the terminal service processing unit B1 sends the request to the request processing arbitration unit A1, the request processing arbitration unit A1 triggers the request scheduling unit T to acquire the state information corresponding to the request, and the request processing arbitration unit A1 judges whether the response strategy corresponding to the request is stored in the terminal storage unit E according to the response strategy and the state information; if the judgment result shows that the response data corresponding to the request is stored in the terminal storage unit E, triggering the request scheduling unit T to take the response data out of the terminal storage unit E and sending the response data to the terminal service processing unit B1; if the judgment result shows that the response strategy corresponding to the request is not stored in the terminal storage unit E, the request is sent to the server, after the request response arbitration unit A2 receives the request sent by the terminal, whether response data corresponding to the request is stored in the server storage unit D2 is judged, if the response data is stored in the server storage unit D2, the response data is taken out of the server storage unit D2 and sent to the terminal, if the response data is not stored in the server storage unit D2, the request is sent to the server business processing unit B2 to respond, response data is obtained, the response data is stored in the server storage unit D2, and the response data is sent to the terminal; and the terminal receives the response data sent by the server, triggers the request scheduling unit T to store the response data into the terminal storage unit E, and sends the response data to the terminal service processing unit B1.
In the interaction process, the terminal can clear the response data from the terminal storage unit E according to the response strategy; after the server initiates the response data change actively, the server regenerates the response strategy and sends the response strategy to the terminal, and after the terminal receives the response strategy sent by the server, the response data in the terminal storage unit E is invalid, so that the request is sent to the server to obtain the changed response data without obtaining the response data from the terminal storage unit E next time aiming at the same request, thereby ensuring that the terminal service processing unit B1 can obtain the correct response data.
In a ninth embodiment of the present disclosure, there is provided a terminal, such as the terminal shown in fig. 4, including:
the system comprises a terminal service processing unit B1, a request processing arbitration unit A1, a request scheduling unit T and a terminal storage unit E, wherein the terminal service processing unit B1 is connected with the request processing arbitration unit A1, the request processing arbitration unit A1 is connected with the request scheduling unit T, and the request scheduling unit T is connected with the terminal storage unit E; the terminal storage unit E comprises a terminal memory C and a terminal disk area D1, the terminal memory C is connected with the request scheduling unit T, and the terminal disk area D1 is connected with the terminal memory C;
the terminal service processing unit B1 is used for sending a request to the request processing arbitration unit A1 and processing the service in the terminal according to the response data corresponding to the request; a request processing arbitration unit A1 for judging whether the response data is stored in the terminal storage unit E; the request scheduling unit T comprises a request scheduling process and is used for scheduling request and response data; and the terminal storage unit E is used for storing the response data.
In a tenth embodiment of the present disclosure, a server, such as the server shown in fig. 4, is provided, where the server includes:
the system comprises a server service processing unit B2, a request response arbitration unit A2 and a server storage unit D2, wherein the request response arbitration unit A2 is connected with the server service processing unit B2, and the server service processing unit B2 is connected with the server storage unit D2;
the service end service processing unit B2 is used for responding to the request sent by the terminal and generating a response strategy; the request response arbitration unit A2 is used for judging whether response data corresponding to the request is stored in the server storage unit D2; and the server storage unit D2 is used for storing the response data.
Fig. 5 is a schematic structural diagram of an interaction apparatus according to an eleventh embodiment of the present disclosure, and as shown in fig. 5, the apparatus is applied to a terminal, and the terminal includes a terminal service processing unit, a request processing arbitration unit, a request scheduling unit, and a terminal storage unit, and the apparatus includes: a first sending module 50, configured to send a request to a request processing arbitration unit by a terminal service processing unit; a first judging module 51, configured to judge, by the request processing arbitration unit, whether response data corresponding to the request is stored in the terminal storage unit, so as to obtain a first judgment result; the first feedback module 52 is configured to trigger the request scheduling unit to take out the response data from the terminal storage unit and send the response data to the terminal service processing unit if the first determination result is yes; the second sending module 53 is configured to send the request to the server and receive response data returned by the server if the first determination result is negative; and the second feedback module 54 stores the response data to the terminal storage unit according to the request scheduling unit, and sends the response data to the terminal service processing unit.
In an implementation manner, the first determining module 51 mainly includes:
the obtaining sub-module 510 is configured to trigger the request scheduling unit to obtain status information corresponding to the request by the request processing arbitration unit; the judging sub-module 511 is configured to judge, by the request processing arbitration unit, whether response data corresponding to the request is stored in the terminal storage unit according to the response policy and the state information.
In an implementation manner, the determining sub-module 511 is further configured to determine whether the request is a primary request according to the request frequency in the status information, so as to obtain a second determination result; if the second judgment result is yes, the corresponding response data is not stored in the terminal storage unit; if the second judgment result is negative, judging whether the state information meets the response strategy or not to obtain a third judgment result; if the third judgment result is yes, the corresponding response data is requested to be stored in the terminal storage unit; and if the third judgment result is negative, the corresponding response data is not stored in the terminal storage unit.
In one embodiment, the terminal storage unit includes a terminal memory and a terminal volume, and the second feedback module 54 includes:
the storage submodule 540 is configured to store the response data in the terminal memory according to the request scheduling unit; and a mapping submodule 541, configured to map the response data to the terminal disk region by the terminal memory.
In one embodiment, the apparatus further comprises:
a first receiving module 55, configured to receive a response policy sent by a server; and a clearing module 56 for clearing the response data from the terminal storage unit according to the response policy.
In an implementation manner, the clearing module 56 is further configured to determine whether the request corresponding to the response data satisfies the response policy, so as to obtain a fourth determination result; and if the fourth judgment result is negative, clearing the response data from the terminal storage unit.
Fig. 6 is a schematic structural diagram of an interaction apparatus according to a twelfth embodiment of the present disclosure, as shown in fig. 6, the apparatus is applied to a server, the server includes a server service processing unit, a request response arbitration unit, and a server storage unit, and the apparatus includes:
a second receiving module 60, configured to request the response arbitration unit to receive a request from a terminal; a second judging module 61, configured to judge whether response data corresponding to the request is stored in the server storage unit; and the third feedback module 62 is configured to take the response data out of the server storage unit and send the response data to the terminal if the determination result is yes.
In one embodiment, the apparatus further comprises:
a third sending module 63, configured to send the request to the service processing unit at the server if the determination result is negative; a response module 64, configured to respond to the request by the service processing unit at the server side to obtain response data; and a fourth feedback module 65, configured to store the response data in the server storage unit, and send the response data to the terminal.
In one embodiment, the apparatus further comprises:
a generating module 66, configured to generate a response policy according to the request if the data change is responded; a fourth sending module 67, configured to send the response policy to the terminal.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701 which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can be stored. The calculation unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 701 performs the various methods and processes described above, such as an interactive method. For example, in some embodiments, an interaction method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When loaded into RAM 703 and executed by the computing unit 701, may perform one or more of the steps of an interaction method as described above. Alternatively, in other embodiments, the computing unit 701 may be configured to perform an interaction method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (16)

1. An interaction method is applied to a terminal, the terminal comprises a terminal service processing unit, a request processing arbitration unit, a request scheduling unit and a terminal storage unit, and the method comprises the following steps:
the terminal service processing unit sends a request to the request processing arbitration unit;
the request processing arbitration unit judges whether response data corresponding to the request is stored in the terminal storage unit or not to obtain a first judgment result;
if so, triggering the request scheduling unit to take the response data out of the terminal storage unit and sending the response data to the terminal service processing unit;
if the first judgment result is negative, the request is sent to a server, and the response data returned by the server is received; and storing the response data to the terminal storage unit according to the request scheduling unit, and sending the response data to the terminal service processing unit.
2. The method of claim 1, wherein the determining, by the request processing arbitration unit, whether response data corresponding to the request is stored in the terminal storage unit comprises:
the request processing arbitration unit triggers the request scheduling unit to acquire the state information corresponding to the request;
and the request processing arbitration unit judges whether response data corresponding to the request is stored in the terminal storage unit according to a response strategy and the state information.
3. The method of claim 2, wherein determining whether response data corresponding to the request is stored in the terminal storage unit according to a response policy and the state information comprises:
judging whether the request is a primary request or not according to the request frequency in the state information to obtain a second judgment result;
if the second judgment result is yes, the response data corresponding to the request is not stored in the terminal storage unit;
if the second judgment result is negative, judging whether the state information meets the response strategy or not to obtain a third judgment result;
if the third judgment result is yes, the response data corresponding to the request is stored in the terminal storage unit;
and if the third judgment result is negative, the response data corresponding to the request is not stored in the terminal storage unit.
4. The method of claim 3, wherein the terminal storage unit includes a terminal memory and a terminal volume, and the scheduling unit according to the request stores the response data to the terminal storage unit, including:
storing the response data to the terminal memory according to the request scheduling unit;
and the terminal memory maps the response data to the terminal disk region.
5. The method of any of claims 3 to 4, wherein the response policy comprises: request timeliness range, request frequency range, request sequence and storage area size;
the method further comprises the following steps: receiving the response strategy sent by the server, and;
and clearing the response data from the terminal storage unit according to the response strategy.
6. The method of claim 5, wherein said clearing the response data from the terminal storage unit according to the response policy comprises:
judging whether the request corresponding to the response data meets the response strategy or not to obtain a fourth judgment result;
and if the fourth judgment result is negative, clearing the response data from the terminal storage unit.
7. An interaction method is applied to a server, the server comprises a server service processing unit, a request response arbitration unit and a server storage unit, and the method comprises the following steps:
the request response arbitration unit receives a request from a terminal and judges whether response data corresponding to the request is stored in the server storage unit;
and if so, taking the response data out of the server storage unit and sending the response data to the terminal.
8. The method of claim 7, further comprising:
if not, sending the request to the service end service processing unit;
the service end service processing unit responds to the request to obtain the response data;
and storing the response data to the server storage unit, and sending the response data to the terminal.
9. The method of any of claims 7 to 8, further comprising:
if the response data is changed, the service end service processing unit generates a response strategy according to the request;
and sending the response strategy to the terminal.
10. A terminal, comprising:
the terminal service processing unit is connected with the request processing arbitration unit, the request processing arbitration unit is connected with the request scheduling unit, and the request scheduling unit is connected with the terminal storage unit;
the terminal storage unit comprises a terminal memory and a terminal disk area, the terminal memory is connected with the request scheduling unit, and the terminal disk area is connected with the terminal memory;
the terminal service processing unit is used for sending a request to the request processing arbitration unit and processing the service in the terminal according to the response data corresponding to the request;
the request processing arbitration unit is used for judging whether the response data is stored in the terminal storage unit or not;
the request scheduling unit comprises a request scheduling process and is used for scheduling the request and the response data;
and the terminal storage unit is used for storing the response data.
11. A server, comprising:
the system comprises a server service processing unit, a request response arbitration unit and a server storage unit, wherein the request response arbitration unit is connected with the server service processing unit, and the server service processing unit is connected with the server storage unit;
the server service processing unit is used for responding to the request sent by the terminal and generating a response strategy;
the request response arbitration unit is used for judging whether response data corresponding to the request is stored in the server storage unit;
and the server storage unit is used for storing the response data.
12. An interactive device is applied to a terminal, the terminal comprises a terminal service processing unit, a request processing arbitration unit, a request scheduling unit and a terminal storage unit, and the device comprises:
a first sending module, configured to send a request to the request processing arbitration unit by the terminal service processing unit;
the first judgment module is used for judging whether response data corresponding to the request is stored in the terminal storage unit by the request processing arbitration unit to obtain a first judgment result;
the first feedback module is used for triggering the request scheduling unit to take the response data out of the terminal storage unit and send the response data to the terminal service processing unit if the first judgment result is yes;
the second sending module is used for sending the request to a server and receiving the response data returned by the server if the first judgment result is negative;
and the second feedback module is used for storing the response data to the terminal storage unit according to the request scheduling unit and sending the response data to the terminal service processing unit.
13. An interactive device is applied to a server, the server includes a server service processing unit, a request response arbitration unit and a server storage unit, the device includes:
a second receiving module, configured to receive, by the request response arbitration unit, a request from a terminal;
the second judging module is used for judging whether response data corresponding to the request is stored in the server storage unit or not;
and the third feedback module is used for taking the response data out of the server storage unit and sending the response data to the terminal if the judgment result is yes.
14. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6 or to perform the method of any one of claims 7-9.
15. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6 or the method of any one of claims 7-9.
16. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6, or implements the method according to any one of claims 7-9.
CN202211660351.6A 2022-12-21 2022-12-21 Interaction method, terminal, server, device, equipment and storage medium Withdrawn CN115988082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211660351.6A CN115988082A (en) 2022-12-21 2022-12-21 Interaction method, terminal, server, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211660351.6A CN115988082A (en) 2022-12-21 2022-12-21 Interaction method, terminal, server, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115988082A true CN115988082A (en) 2023-04-18

Family

ID=85969459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211660351.6A Withdrawn CN115988082A (en) 2022-12-21 2022-12-21 Interaction method, terminal, server, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115988082A (en)

Similar Documents

Publication Publication Date Title
EP4119896A2 (en) Method and apparatus for processing high-definition map data, electronic device, medium and product
CN113766487B (en) Cloud mobile phone information acquisition method, device, equipment and medium
CN112905314A (en) Asynchronous processing method and device, electronic equipment, storage medium and road side equipment
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN113407347A (en) Resource scheduling method, device, equipment and computer storage medium
CN112883041B (en) Data updating method and device, electronic equipment and storage medium
CN114666319B (en) Data downloading method, device, electronic equipment and readable storage medium
CN115988082A (en) Interaction method, terminal, server, device, equipment and storage medium
CN114170821B (en) Signal machine performance detection method and device and traffic signal lamp control system
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN113568706A (en) Container adjusting method and device for service, electronic equipment and storage medium
CN114964295A (en) Navigation method, device and system and electronic equipment
CN114036250A (en) High-precision map task processing method and device, electronic equipment and medium
CN113327602A (en) Method and device for speech recognition, electronic equipment and readable storage medium
CN112965836A (en) Service control method and device, electronic equipment and readable storage medium
CN112714420A (en) Network access method and device of wifi hotspot providing equipment and electronic equipment
CN115604354B (en) Transaction processing method, device and equipment based on block chain and storage medium
CN117311917A (en) Method for switching vehicles based on vehicle-to-vehicle application program, electronic equipment and storage medium
CN116614379B (en) Bandwidth adjustment method and device for migration service and related equipment
CN114416414B (en) Fault information positioning method, device, equipment and storage medium
CN114006902B (en) Cloud mobile phone restarting method, device, equipment and storage medium
CN113641428B (en) Method and device for acquiring special effect scene packet, electronic equipment and readable storage medium
CN112506582B (en) Method, device, equipment and medium for processing small program data packet
CN114661755A (en) Display mode, device and electronic equipment
CN117221245A (en) Message sending method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20230418

WW01 Invention patent application withdrawn after publication