CN110365745B - Data processing system, method, apparatus, server and computer readable medium - Google Patents

Data processing system, method, apparatus, server and computer readable medium Download PDF

Info

Publication number
CN110365745B
CN110365745B CN201910544534.3A CN201910544534A CN110365745B CN 110365745 B CN110365745 B CN 110365745B CN 201910544534 A CN201910544534 A CN 201910544534A CN 110365745 B CN110365745 B CN 110365745B
Authority
CN
China
Prior art keywords
target data
latest
attribute information
information
service request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910544534.3A
Other languages
Chinese (zh)
Other versions
CN110365745A (en
Inventor
张骏杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910544534.3A priority Critical patent/CN110365745B/en
Publication of CN110365745A publication Critical patent/CN110365745A/en
Application granted granted Critical
Publication of CN110365745B publication Critical patent/CN110365745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a data processing system, a method, a device, a server and a computer readable medium. The system comprises terminal equipment and a server; the terminal equipment is configured to acquire target data from a local cache and send a service request containing the target data and attribute information of the target data to a server; the server configured to determine whether the target data is expired based on the attribute information; if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data. This embodiment saves network resources.

Description

Data processing system, method, apparatus, server and computer readable medium
Technical Field
The embodiments of the present application relate to the field of computer technologies, and in particular, to a data processing system, a data processing method, a data processing apparatus, a server, and a computer-readable medium.
Background
During the interaction between the server and the terminal device, the terminal device usually needs to request a service from the server. When requesting a service, different response information is usually returned for different users or different terminal devices. For example, when a general user requests a certain video resource, the promotion information and the permission prompt information of the video resource are returned, and when a user having a viewing permission for the video resource requests the video resource, the video resource can be returned.
In the conventional method, after receiving a service request, a server generally calls an interface related to user information or device information to determine target data (for example, a return value) corresponding to a terminal device requesting the service, and then performs different processing based on the data. However, since the server usually needs to process a large number of service requests, this approach requires multiple calls to the interface, which wastes network resources.
Disclosure of Invention
The embodiment of the application provides a data processing system, a data processing method, a data processing device, a server and a computer readable medium, so as to solve the technical problem of network resource waste in the prior art.
In a first aspect, an embodiment of the present application provides a data processing system, including a terminal device and a server; the terminal equipment is configured to acquire target data from a local cache and send a service request containing the target data and attribute information of the target data to the server, wherein the target data is data predetermined based on user information of a user using the terminal equipment and/or equipment information of the terminal equipment; a server configured to determine whether the target data is expired based on the attribute information; if so, acquiring the latest target data, and sending response information containing the latest target data to the terminal equipment based on the latest target data processing service request so that the terminal equipment replaces the target data in the cache with the latest target data.
In some embodiments, the server is further configured to, in response to determining that the target data is not expired, process the service request based on the target data, and send response information to the service request to the terminal device.
In some embodiments, the server stores the latest attribute information of the latest target data; and a server further configured to match the attribute information with the latest attribute information; determining that the target data is not expired in response to determining that the attribute information is the same as the latest attribute information; in response to determining that the attribute information is not the same as the most recent attribute information, determining that the target data is expired.
In some embodiments, the server is further configured to store the latest attribute information by: continuously monitoring the update of the target data; and responding to the monitored update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information.
In some embodiments, the server is further configured to obtain the latest target data by: acquiring latest user information and/or latest equipment information; and calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface.
In some embodiments, the terminal device is further configured to send an initial service request to the server in response to determining that the target data is not contained in the cache; the server is further configured to respond to the received initial service request and obtain target data corresponding to the terminal equipment; processing the initial service request based on the target data; and sending initial response information containing the target data to the terminal equipment so that the terminal equipment stores the target data in the cache.
In some embodiments, the terminal device is further configured to delete the target data in the cache in response to detecting a user-triggered target operation.
In some embodiments, the attribute information includes a version number and/or a timestamp of the target data, and the latest attribute information includes a version number and/or a timestamp of the latest target data.
In a second aspect, an embodiment of the present application provides a data processing method, where the method is applied to a server, and includes: receiving a service request sent by terminal equipment, wherein the service request comprises target data and attribute information of the target data, which are positioned in a cache of the terminal equipment, and the target data are data predetermined based on user information of a user using the terminal equipment and/or equipment information of the terminal equipment; determining whether the target data is expired based on the attribute information; if so, acquiring the latest target data, and sending response information containing the latest target data to the terminal equipment based on the latest target data processing service request so that the terminal equipment replaces the target data in the cache with the latest target data.
In some embodiments, the method further comprises: in response to determining that the target data is not expired, processing the service request based on the target data, and sending response information to the service request to the terminal device.
In some embodiments, the server stores the latest attribute information of the latest target data; and determining whether the target data is expired based on the attribute information, including: matching the attribute information with the latest attribute information; determining that the target data is not expired in response to determining that the attribute information is the same as the latest attribute information; in response to determining that the attribute information is not the same as the most recent attribute information, determining that the target data is expired.
In some embodiments, the latest attribute information is stored by: continuously monitoring the update of the target data; and responding to the monitored update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information.
In some embodiments, obtaining the latest target data comprises: acquiring latest user information and/or latest equipment information; and calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface.
In some embodiments, before receiving the service request sent by the terminal device, the method further includes: the method comprises the steps of responding to an initial service request sent by a terminal device, and obtaining target data corresponding to the terminal device; processing the initial service request based on the target data; and sending initial response information containing the target data to the terminal equipment so that the terminal equipment stores the target data in the cache.
In some embodiments, the attribute information includes a version number and/or a timestamp of the target data, and the latest attribute information includes a version number and/or a timestamp of the latest target data.
In a third aspect, an embodiment of the present application provides a data processing apparatus, including: applied to a server, comprising: a first receiving unit configured to receive a service request sent by a terminal device, wherein the service request includes target data in a cache of the terminal device and attribute information of the target data, and the target data is data predetermined based on user information of a user using the terminal device and/or device information of the terminal device; a determination unit configured to determine whether the target data is expired based on the attribute information; and the first sending unit is configured to acquire the latest target data if the target data is the latest target data, and send response information containing the latest target data to the terminal equipment based on the latest target data processing service request so that the terminal equipment replaces the target data in the cache with the latest target data.
In some embodiments, the apparatus further comprises: a second transmitting unit configured to, in response to determining that the target data is not expired, process the service request based on the target data, transmit response information to the service request to the terminal device.
In some embodiments, the server stores the latest attribute information of the latest target data; and a determination unit further configured to: matching the attribute information with the latest attribute information; determining that the target data is not expired in response to determining that the attribute information is the same as the latest attribute information; in response to determining that the attribute information is not the same as the most recent attribute information, determining that the target data is expired.
In some embodiments, the latest attribute information is stored by: continuously monitoring the update of the target data; and responding to the monitored update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information.
In some embodiments, the first sending unit is further configured to obtain the latest target data by: acquiring latest user information and/or latest equipment information; and calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface.
In some embodiments, the apparatus further comprises: the second receiving unit is configured to respond to the initial service request sent by the terminal equipment and acquire target data corresponding to the terminal equipment; a processing unit configured to process the initial service request based on the target data; and a third sending unit configured to send initial response information containing the target data to the terminal device so that the terminal device stores the target data in the cache.
In some embodiments, the attribute information includes a version number and/or a timestamp of the target data, and the latest attribute information includes a version number and/or a timestamp of the latest target data.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: one or more processors; storage means having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the embodiments of the first aspect described above.
In a fifth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to any one of the embodiments of the first aspect.
According to the data processing system, the data processing method, the data processing device, the server and the computer readable medium, the terminal equipment acquires the target data from the local cache, and sends the service request containing the target data predetermined based on the user information and/or the equipment information and the attribute information of the target data to the server; then the server determines whether the target data is expired based on the attribute information; and if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data. Therefore, the target data is cached to the terminal equipment, and after the cached target data is expired, the latest target data is returned through the server to update the cache. Therefore, the server does not need to actively acquire the target data after receiving the service request every time, network resources are saved, and the processing efficiency of the server on the service request is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a timing diagram for one embodiment of a data processing system according to the present application;
FIG. 2 is a flow diagram of one embodiment of a data processing method according to the present application;
FIG. 3 is a schematic block diagram of one embodiment of a data processing apparatus according to the present application;
FIG. 4 is a block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Referring to FIG. 1, a timing diagram for one embodiment of a data processing system according to the present application is shown.
The data processing system comprises terminal equipment and a server. The terminal device may include, but is not limited to, a smart phone, a tablet computer, a laptop computer, and the like. The terminal device and the server can interact through a network. The device may send a service request to the server, and the server may return corresponding response information.
As shown in FIG. 1, a timing diagram for one embodiment of a data processing system may involve the steps of:
step 101, the terminal device obtains target data from a local cache.
In this embodiment, the local cache of the terminal device may store the target data in advance, and the execution main body may obtain the target data from the local cache. The target data may be data (e.g., a value, an identifier, etc.) determined based on user information of a user using the device and/or device information of the terminal device.
As an example, the target data may be a return value output by a certain preset interface after the user information and/or the device information is input to the preset interface. Here, the preset interface may be used to determine return values corresponding to different user information and/or device information.
In practice, the target data may be used to instruct the server to choose the way in which to process the request. Different target data may instruct the server to select different processing modes for the requested processing. For example, the terminal device may be installed with a video-like application. When the user clicks on a play page of a certain video in the video application, a page data acquisition request may be sent to the server. At this time, if the user is a normal user (i.e., a user who does not have a viewing right for the video), the target data may be a return value of "1". Then, the server may determine that the user does not have the viewing right for the video based on the return value, and thereby feed back prompt information indicating that the user upgrade is performed as a response to the page data acquisition request. As another example, if the user is an important user (i.e., a user having viewing rights to the video), the target information may be a return value of "0". At this time, the server may determine that the user has a viewing right for the video based on the return value, further acquire video data, and return the video data.
Step 102, the terminal device sends a service request containing target data and attribute information of the target data to a server.
In this embodiment, after acquiring the target data from the cache, the terminal device may query attribute information of the target data, and send a service request including the target data and the attribute information of the target data to the server. Here, the attribute information of the target data may be various information related to the target data, such as a version number, a time stamp, an acquisition time, and the like. Wherein the timestamp may be used to indicate the creation time of the target data.
In step 103, the server determines whether the target data is expired based on the attribute information.
In this embodiment, since the configuration change is performed by the operator in some cases (for example, in the case of service change, system upgrade, and the like), the target data determined based on the user information and/or the device information may be updated. Since the attribute information may include a version number, a time stamp, an acquisition time, and the like, the attribute information is updated every time the target data is updated. Thus, the server may determine whether the target data is expired based on the attribute information.
In some optional implementations of the embodiment, the server may store latest attribute information of the latest target data. In this case, the server may match the attribute information with the latest attribute information. In response to determining that the attribute information is the same as the most recent attribute information, it may be determined that the target data is not expired. In response to determining that the attribute information is not the same as the latest attribute information, it may be determined that the target data is expired. Optionally, the attribute information may include a version number and/or a time stamp of the target data, and the latest attribute information may include a version number and/or a time stamp of the latest target data.
As an example, the server may obtain the latest version number of the target data. If the version number of the attribute information is different from the latest version number, the target data can be determined to be overdue; if the version number of the attribute information is the same as the latest version number, it can be determined that the target data is not expired.
As yet another example, the server may obtain the latest timestamp of the latest target data. If the timestamp is different from the latest timestamp, the target data can be determined to be expired; if the timestamp is the same as the latest timestamp, it can be determined that the target data is not expired.
In some optional implementation manners of this embodiment, the server may store the latest attribute information by: and a first step of continuously monitoring the update of the target data. And secondly, responding to the monitoring of the update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information. Thus, the server can store the latest attribute information of the latest target data every time the target data is updated. In practice, the latest attribute information may be stored in the cache of the server.
In some optional implementation manners of this embodiment, after receiving the target data and the attribute information, the server may further check the target data and the attribute information to ensure reliability of the received data. After the verification passes, an operation of determining whether the attribute information is expired may be performed. If the verification fails, the received target data can be deleted, and the latest target data can be obtained.
And step 104, the server responds to the determined target data expiration, acquires the latest target data, processes the service request based on the latest target data and sends response information containing the latest target data to the terminal equipment.
In this embodiment, the server may acquire the latest target data in response to determining that the target data is out of date. Since the target data may be used to instruct the server to select a processing method for the request, after obtaining the latest target data, the server may determine a processing method for the service request based on the latest target data, and process the service request using the processing method. And finally, sending response information containing the latest target data to the terminal equipment.
In some optional implementation manners of this embodiment, the server may obtain the latest target data by:
the method comprises the first step of acquiring the latest user information of a user using the terminal equipment and/or the latest equipment information of the terminal equipment. In one scenario, the latest user information and/or latest device information may be stored in a server in advance, and at this time, the server may obtain the user information and the device information from a local location. In another scenario, the server may send a data acquisition request to the terminal device to acquire the latest user information and/or the latest device information from the terminal device.
And step two, calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface. Here, the preset interface may be used to determine return values corresponding to different user information and/or device information.
In some optional implementation manners of this embodiment, before sending the response information including the latest target data to the terminal device, the server may sign the latest target data, so as to check the signature after receiving the next service request.
And 105, replacing the target data in the cache with the latest target data by the terminal equipment.
In this embodiment, after receiving the response information including the latest target data, the terminal device may replace the target data in the cache with the latest target data, so as to update the target data in the cache in time.
In some optional implementation manners of this embodiment, in response to determining that the target data is not expired, the server may directly process the service request based on the target data, and send response information to the service request to the terminal device.
In some optional implementation manners of this embodiment, the terminal device may delete the target data in the cache in response to detecting a target operation triggered by a user. Wherein the target operation may be an operation causing the target data to fail. For example, the above target operations may include, but are not limited to: common users are upgraded to important users, points are increased due to the fact that the users complete tasks, and the users replace equipment or accounts.
It is understood that when the client requests service for the first time, the target data is not stored in the cache. Thus, in some optional implementations of this embodiment, the terminal device may send an initial service request to the server in response to determining that the cache does not contain the target data. Here, the initial service request does not contain the target data. Then, the server may obtain the target data corresponding to the terminal device in response to receiving the initial service request. Thereafter, the server may process the initial service request based on the target data. Finally, the server may send initial response information including the target data to the terminal device, so that the terminal device stores the target data in the cache.
In the system provided by the embodiment of the application, the terminal device acquires the target data from the local cache, and sends the service request containing the target data predetermined based on the user information and/or the device information and the attribute information of the target data to the server; then the server determines whether the target data is expired based on the attribute information; if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data. Therefore, the target data is cached to the terminal equipment, and after the cached target data is expired, the latest target data is returned through the server to update the cache. Therefore, the server does not need to actively acquire the target data after receiving the service request every time, network resources are saved, and the processing efficiency of the server on the service request is improved.
Referring to FIG. 2, a flow 200 of one embodiment of a data processing method according to the present application is shown. The data processing method comprises the following steps:
step 201, receiving a service request sent by a terminal device.
In this embodiment, an execution subject (e.g., a server) of the data processing method may receive a service request transmitted by the terminal device. The service request may include target data located in a cache of the terminal device and attribute information of the target data. The target data is data predetermined based on user information of a user using the terminal device and/or device information of the terminal device.
Step 202, determining whether the target data is expired based on the attribute information.
In this embodiment, since the configuration change may be performed by the operator in some cases, the target data determined based on the user information and/or the device information may be updated. Since the attribute information may include a version number, a time stamp, an acquisition time, and the like, the attribute information is updated every time the target data is updated. Accordingly, the execution body may determine whether the target data is expired based on the attribute information. As an example, the execution body may obtain the latest version number of the target data. If the version number of the attribute information is different from the latest version number, the target data can be determined to be overdue; if the version number of the attribute information is the same as the latest version number, it can be determined that the target data is not expired.
In some optional implementations of the embodiment, the execution body may store latest attribute information of the latest target data. In this case, the execution body may match the attribute information with the latest attribute information. In response to determining that the attribute information is the same as the latest attribute information, it may be determined that the target data is not expired. In response to determining that the attribute information is not the same as the latest attribute information, it may be determined that the target data is expired.
In some optional implementations of this embodiment, the executing entity may store the latest attribute information by: and a first step of continuously monitoring the update of the target data. And secondly, responding to the monitoring of the update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information. Thus, the execution body can store the latest attribute information of the latest target data every time the target data is updated. In practice, the latest attribute information may be stored in the cache of the execution body. Optionally, the attribute information may include a version number and/or a time stamp of the target data, and the latest attribute information may include a version number and/or a time stamp of the latest target data.
And 203, if so, acquiring the latest target data, and sending response information containing the latest target data to the terminal equipment based on the latest target data processing service request so that the terminal equipment replaces the target data in the cache with the latest target data.
In this embodiment, in response to determining that the target data is expired, the execution main body may acquire the latest target data, process the service request based on the latest target data, and send response information including the latest target data to the terminal device, so that the terminal device replaces the target data in the cache with the latest target data.
In some optional implementation manners of this embodiment, in response to determining that the target data is not expired, the execution main body may process the service request based on the target data, and send response information to the service request to the terminal device.
In some optional implementation manners of this embodiment, the terminal device may delete the target data in the cache in response to detecting a target operation triggered by a user. Wherein the target operation may be an operation causing the target data to fail. For example, the above target operations may include, but are not limited to: common users are upgraded to important users, points are increased due to the fact that the users complete tasks, and the users replace equipment or accounts.
It is understood that when the client requests service for the first time, the target data is not stored in the cache. The terminal device may send an initial service request to the execution main body in response to determining that the target data is not contained in the cache. Here, the initial service request does not contain the target data. Therefore, in some optional implementations of this embodiment, the executing entity may obtain the target data corresponding to the terminal device in response to receiving the initial service request. Thereafter, the execution agent may process the initial service request based on the target data. Finally, the execution subject may send initial response information including the target data to the terminal device, so that the terminal device stores the target data in the cache.
In the method provided by the foregoing embodiment of the present application, the target data located in the cache of the terminal device and the attribute information of the target data are obtained by receiving a service request sent by the terminal device. Then determining whether the target data is expired based on the attribute information; if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data. Therefore, the cache is updated by storing the target data in the cache of the terminal equipment and returning the latest target data through the server after the cached target data is expired. Therefore, the server does not need to actively acquire the target data after receiving the service request every time, network resources are saved, and the processing efficiency of the server on the service request is improved.
With further reference to fig. 3, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of a data processing apparatus, which corresponds to the embodiment of the method shown in fig. 1, and which is particularly applicable in a server.
As shown in fig. 3, the data processing apparatus 300 according to the present embodiment includes: a first receiving unit 301 configured to receive a service request sent by a terminal device, where the service request includes target data in a cache of the terminal device and attribute information of the target data, and the target data is data predetermined based on user information of a user using the terminal device and/or device information of the terminal device; a determining unit 302 configured to determine whether the target data is expired based on the attribute information; a first sending unit 303, configured to, if yes, obtain latest target data, process the service request based on the latest target data, and send response information including the latest target data to the terminal device, so that the terminal device replaces the target data in the cache with the latest target data.
In some optional implementations of this embodiment, the apparatus further includes: and a second transmitting unit configured to, in response to determining that the target data is not expired, process the service request based on the target data, and transmit response information to the service request to the terminal device.
In some optional implementations of this embodiment, the server stores latest attribute information of the latest target data; and the above-mentioned determining unit, further configured to: matching the attribute information with the latest attribute information; determining that the target data is not expired in response to determining that the attribute information is the same as the latest attribute information; in response to determining that the attribute information is not the same as the latest attribute information, determining that the target data is expired.
In some optional implementations of this embodiment, the latest attribute information is stored by: continuously monitoring the update of the target data; and in response to monitoring the update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information.
In some optional implementations of this embodiment, the first sending unit is further configured to obtain the latest target data by: acquiring the latest user information and/or the latest equipment information; and calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface.
In some optional implementations of this embodiment, the apparatus further includes: the second receiving unit is configured to respond to the initial service request sent by the terminal equipment and acquire target data corresponding to the terminal equipment; a processing unit configured to process the initial service request based on the target data; a third sending unit configured to send initial response information including the target data to the terminal device so that the terminal device stores the target data in the cache.
In some optional implementations of the embodiment, the attribute information includes a version number and/or a timestamp of the target data, and the latest attribute information includes a version number and/or a timestamp of the latest target data.
The device provided by the embodiment of the application acquires target data from a local cache through the terminal equipment, and sends a service request containing the target data and attribute information of the target data to the server; then the server determines whether the target data is expired based on the attribute information; if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data. Therefore, the target data is cached to the terminal equipment, and after the cached target data is expired, the latest target data is returned through the server to update the cache. Therefore, the server does not need to actively acquire the target data after receiving the service request every time, network resources are saved, and the processing efficiency of the server on the service request is improved.
Referring now to FIG. 4, a block diagram of a computer system 400 suitable for use in implementing a server according to embodiments of the present application is shown. The server shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display such as a Liquid Crystal Display (LCD) and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 401. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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 portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The units described may also be provided in a processor, where the names of the units do not in some cases constitute a limitation of the units themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: receiving a service request sent by terminal equipment, wherein the service request comprises target data in a cache of the terminal equipment and attribute information of the target data; determining whether the target data is expired based on the attribute information; if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (18)

1. A data processing system is characterized by comprising a terminal device and a server;
the terminal device is configured to acquire target data from a local cache and send a service request containing the target data and attribute information of the target data to a server, wherein the target data is data predetermined based on user information of a user using the terminal device and/or device information of the terminal device and is used for indicating the server to select a processing mode of the service request;
the server configured to determine whether the target data is expired based on the attribute information, including: matching the attribute information with the latest attribute information; in response to determining that the attribute information is the same as the most recent attribute information, determining that the target data is not expired; in response to determining that the attribute information is not the same as the most recent attribute information, determining that the target data is expired; the latest attribute information of the latest target data is stored in the server, the attribute information comprises the version number and/or the timestamp of the target data, and the latest attribute information comprises the version number and/or the timestamp of the latest target data;
if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data.
2. The data processing system of claim 1, wherein the server is further configured to, in response to determining that the target data is not expired, process the service request based on the target data, and send response information to the service request to the terminal device.
3. The data processing system of claim 1, wherein the server is further configured to store the latest attribute information by:
continuously monitoring the update of the target data;
and responding to the monitoring of the update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information.
4. The data processing system of claim 1, wherein the server is further configured to obtain the latest target data by:
acquiring latest user information and/or latest equipment information;
and calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface.
5. The data processing system of claim 1, wherein the terminal device is further configured to send an initial service request to the server in response to determining that the target data is not contained in the cache;
the server is further configured to respond to the initial service request and obtain target data corresponding to the terminal equipment; processing the initial service request based on the target data; and sending initial response information containing the target data to the terminal equipment so that the terminal equipment stores the target data in the cache.
6. The data processing system of claim 1, wherein the terminal device is further configured to delete the target data in the cache in response to detecting a user-triggered target operation.
7. A data processing method is applied to a server and comprises the following steps:
receiving a service request sent by a terminal device, wherein the service request comprises target data and attribute information of the target data, the target data is predetermined data based on user information of a user using the terminal device and/or device information of the terminal device, and the predetermined data is used for indicating the server to select a processing mode of the service request;
determining whether the target data is expired based on the attribute information, including: matching the attribute information with the latest attribute information; in response to determining that the attribute information is the same as the most recent attribute information, determining that the target data is not expired; in response to determining that the attribute information is not the same as the most recent attribute information, determining that the target data is expired; the latest attribute information of the latest target data is stored in the server, the attribute information comprises the version number and/or the timestamp of the target data, and the latest attribute information comprises the version number and/or the timestamp of the latest target data;
if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal equipment so that the terminal equipment replaces the target data in the cache with the latest target data.
8. The data processing method of claim 7, wherein the method further comprises:
and in response to determining that the target data is not expired, processing the service request based on the target data, and sending response information to the service request to the terminal equipment.
9. The data processing method according to claim 7, wherein the latest attribute information is stored by:
continuously monitoring the update of the target data;
and responding to the monitoring of the update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information.
10. The data processing method of claim 7, wherein the obtaining the latest target data comprises:
acquiring latest user information and/or latest equipment information;
and calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface.
11. The data processing method according to claim 7, wherein before the receiving the service request sent by the terminal device, the method further comprises:
responding to an initial service request sent by the terminal equipment, and acquiring target data corresponding to the terminal equipment;
processing the initial service request based on the target data;
and sending initial response information containing the target data to the terminal equipment so that the terminal equipment stores the target data in the cache.
12. A data processing apparatus, applied to a server, includes:
a first receiving unit, configured to receive a service request sent by a terminal device, where the service request includes target data in a cache of the terminal device and attribute information of the target data, and the target data is data predetermined based on user information of a user using the terminal device and/or device information of the terminal device and is used to instruct the server to select a processing mode for the service request;
a determination unit configured to determine whether the target data is expired based on the attribute information, including: matching the attribute information with the latest attribute information; in response to determining that the attribute information is the same as the most recent attribute information, determining that the target data is not expired; in response to determining that the attribute information is not the same as the most recent attribute information, determining that the target data is expired; the latest attribute information of the latest target data is stored in the server, the attribute information comprises the version number and/or the timestamp of the target data, and the latest attribute information comprises the version number and/or the timestamp of the latest target data;
and if so, acquiring the latest target data, processing the service request based on the latest target data, and sending response information containing the latest target data to the terminal device so that the terminal device replaces the target data in the cache with the latest target data.
13. The data processing apparatus of claim 12, wherein the apparatus further comprises:
a second sending unit configured to, in response to determining that the target data is not expired, process the service request based on the target data, and send response information to the service request to the terminal device.
14. The data processing apparatus of claim 12, wherein the latest attribute information is stored by:
continuously monitoring the update of the target data;
and responding to the monitoring of the update of the target data, taking the updated target data as the latest target data, taking the attribute information of the latest target data as the latest attribute information, and acquiring and storing the latest attribute information.
15. The data processing apparatus of claim 12, wherein the first sending unit is further configured to obtain the latest target data by:
acquiring latest user information and/or latest equipment information;
and calling a preset interface, and transmitting the latest user information and/or the latest equipment information to the preset interface to obtain the latest target data returned by the preset interface.
16. The data processing apparatus of claim 12, wherein the apparatus further comprises:
the second receiving unit is configured to respond to the initial service request sent by the terminal equipment and acquire target data corresponding to the terminal equipment;
a processing unit configured to process the initial service request based on the target data;
a third sending unit, configured to send initial response information containing the target data to the terminal device, so that the terminal device stores the target data in the cache.
17. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 7-11.
18. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 7-11.
CN201910544534.3A 2019-06-21 2019-06-21 Data processing system, method, apparatus, server and computer readable medium Active CN110365745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910544534.3A CN110365745B (en) 2019-06-21 2019-06-21 Data processing system, method, apparatus, server and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910544534.3A CN110365745B (en) 2019-06-21 2019-06-21 Data processing system, method, apparatus, server and computer readable medium

Publications (2)

Publication Number Publication Date
CN110365745A CN110365745A (en) 2019-10-22
CN110365745B true CN110365745B (en) 2022-08-05

Family

ID=68217458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910544534.3A Active CN110365745B (en) 2019-06-21 2019-06-21 Data processing system, method, apparatus, server and computer readable medium

Country Status (1)

Country Link
CN (1) CN110365745B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339464B (en) * 2020-02-19 2024-04-26 网易(杭州)网络有限公司 Data processing method and device, electronic equipment and storage medium
CN111752960B (en) * 2020-06-28 2023-07-28 北京百度网讯科技有限公司 Data processing method and device
CN113342837B (en) * 2021-08-06 2021-11-09 北京金山云网络技术有限公司 Data transmission method, device, electronic equipment and computer readable medium
CN114024982B (en) * 2021-11-03 2024-02-23 南京炫佳网络科技有限公司 Information transmission method, service server, terminal device, system and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794721A (en) * 2005-07-27 2006-06-28 华为技术有限公司 Method and device of unloading medium object at appointed time
CN103188235A (en) * 2011-12-30 2013-07-03 北京神州泰岳软件股份有限公司 Method and system for group information synchronization between client and server
CN105933410A (en) * 2016-04-20 2016-09-07 乐视控股(北京)有限公司 Multimedia content providing method and device
CN106385428A (en) * 2015-09-15 2017-02-08 山东华平信息科技有限公司 Page processing method based on medical health cloud platform and cloud platform
CN106612250A (en) * 2015-10-21 2017-05-03 腾讯科技(深圳)有限公司 Resource utilization authority judgment system and method
CN107659542A (en) * 2016-07-26 2018-02-02 阿里巴巴集团控股有限公司 A kind of method for authenticating and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9529603B2 (en) * 2010-07-02 2016-12-27 Nokia Technologies Oy Method and apparatus for dynamic network device start up

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794721A (en) * 2005-07-27 2006-06-28 华为技术有限公司 Method and device of unloading medium object at appointed time
CN103188235A (en) * 2011-12-30 2013-07-03 北京神州泰岳软件股份有限公司 Method and system for group information synchronization between client and server
CN106385428A (en) * 2015-09-15 2017-02-08 山东华平信息科技有限公司 Page processing method based on medical health cloud platform and cloud platform
CN106612250A (en) * 2015-10-21 2017-05-03 腾讯科技(深圳)有限公司 Resource utilization authority judgment system and method
CN105933410A (en) * 2016-04-20 2016-09-07 乐视控股(北京)有限公司 Multimedia content providing method and device
CN107659542A (en) * 2016-07-26 2018-02-02 阿里巴巴集团控股有限公司 A kind of method for authenticating and server

Also Published As

Publication number Publication date
CN110365745A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
CN110365745B (en) Data processing system, method, apparatus, server and computer readable medium
CN108282529B (en) System, method and device for publishing and subscribing data
CN111475180A (en) Method and system for updating client cache
US20210165666A1 (en) Method and apparatus for running applet
CN109582873B (en) Method and device for pushing information
CN108011949B (en) Method and apparatus for acquiring data
CN110377440B (en) Information processing method and device
CN107104999B (en) Method and device for processing service interface call request
CN110460584B (en) Access request processing method and device, electronic equipment and computer readable medium
CN111510466A (en) Data updating method and device for client, electronic equipment and readable medium
CN113961743B (en) Data updating method and device, electronic equipment and storage medium
CN111008032A (en) Page data updating method and device
CN109828830B (en) Method and apparatus for managing containers
CN110543604A (en) information processing method and device
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN108509562B (en) Service processing method and device, electronic equipment and storage medium
CN114625458A (en) Page data processing method and device, electronic equipment and storage medium
CN109683942B (en) Script management method, script management device, script management medium and electronic equipment
CN109120692B (en) Method and apparatus for processing requests
CN110287087B (en) Method and device for detecting application
CN109087097B (en) Method and device for updating same identifier of chain code
CN113760315A (en) Method and device for testing system
CN112084114A (en) Method and apparatus for testing an interface
CN114285743B (en) Method, device, electronic equipment and storage medium for updating configuration information
CN110929233B (en) Information processing method and device

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
GR01 Patent grant
GR01 Patent grant