CN111324615A - Data processing method, device, medium and electronic equipment - Google Patents

Data processing method, device, medium and electronic equipment Download PDF

Info

Publication number
CN111324615A
CN111324615A CN201811528567.0A CN201811528567A CN111324615A CN 111324615 A CN111324615 A CN 111324615A CN 201811528567 A CN201811528567 A CN 201811528567A CN 111324615 A CN111324615 A CN 111324615A
Authority
CN
China
Prior art keywords
target data
data
server
request
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811528567.0A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201811528567.0A priority Critical patent/CN111324615A/en
Publication of CN111324615A publication Critical patent/CN111324615A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data processing method, a data processing device, a computer readable medium and an electronic device, wherein the data processing method comprises the following steps: responding to an access request for target data in a cache, and judging whether the target data is expired; if the target data is expired, sending an updating request for the target data to a server through a message queue; and receiving an update response of the server to the update request, and updating the target data according to the update response. The technical scheme of the embodiment of the invention avoids the problem of buffer penetration caused by centralized penetration of access to the data source, and meanwhile, the client can obtain the updated target data, thereby meeting the actual requirement of a user for obtaining the target data and being beneficial to improving the access experience of the user.

Description

Data processing method, device, medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, a data processing apparatus, a computer readable medium, and an electronic device.
Background
Because the access mode based on the database is low in efficiency, the traditional data access mode depending on the database is difficult to be suitable for high-concurrency application scenes of the internet along with the high-speed development of internet power suppliers. For example: high concurrent scenes such as hot sales of commodities, time-limited sales promotion and the like. In order to be suitable for the internet high availability, final consistency scenario, a cache component is utilized, for example: the technologies of Redis, Java Virtual Machine (JVM for short), and the like are popularized and applied.
However, caching techniques face the problem of having to deal with the penetration of access to the data source due to cache expiration. Especially in a highly concurrent application scenario, if a large number of cache sets are outdated, the access sets penetrate through the data source server, and further the entire system is damaged destructively.
In order to solve the above problem of cache penetration, in the related art, patent application No.: 201710372299.7, title of the invention: a method and a device for preventing cache penetration and a computer readable storage medium provide a solution: the main and standby caches are used for preventing data penetration under the condition that key values fail. And a write command of the server side cache system is also used, so that the database of the server side system cannot be simultaneously requested when the data is refreshed.
However, the related art cannot update data in the cache.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
Embodiments of the present invention provide a data processing method, a data processing apparatus, a computer readable medium, and an electronic device, so as to overcome, at least to a certain extent, a problem that data in a cache cannot be updated in the related art.
Additional features and advantages of the invention will be set forth in the detailed description which follows, or may be learned by practice of the invention.
According to a first aspect of the embodiments of the present invention, there is provided a data processing method, including:
responding to an access request for target data in a cache, and judging whether the target data is expired;
if the target data is expired, sending an updating request for the target data to a server through a message queue;
and receiving an update response of the server to the update request, and updating the target data according to the update response.
In some embodiments of the present invention, before sending an update request for the target data to a server through a message queue, the method further includes:
judging whether the target data is in a source returning period;
and if the target data is not in the back source period, sending an update request for the target data to a server through a message queue.
In some embodiments of the present invention, after determining whether the target data is in the source return period, the method further includes:
and if the target data is in the source returning period, waiting for the server to return an update response to the target data in a message queue mode so as to update the target data.
In some embodiments of the present invention, sending an update request for the target data to a server through a message queue includes:
filtering the access requests corresponding to the same identification according to the identification of the target data in the access requests;
generating an update request in response to the filtered access request;
and adding the updating request into a message queue.
In some embodiments of the invention, filtering access requests corresponding to the same identifier comprises:
for the same identification, the access request received first in time sequence is retained.
In some embodiments of the present invention, sending an update request for the target data to a server through a message queue includes:
and sending an update request of the target data to a server through a message queue according to a preset frequency.
In some embodiments of the present invention, determining whether the target data is expired includes:
and counting down the preset life cycle of the target data, and determining whether the target data is out of date or not according to the counting down.
In some embodiments of the present invention, determining whether the target data is expired includes:
respectively presetting life cycles for different target data to count down the different target data respectively, and determining whether the different target data are out of date according to the count down.
According to a second aspect of the embodiments of the present invention, there is provided a data processing apparatus including:
the judging module is used for responding to an access request of target data and judging whether the target data is overdue or not;
the sending module is used for sending an updating request of the target data to a server through a message queue if the target data is expired;
and the updating module is used for receiving an updating response of the server to the updating request and updating the target data according to the updating response.
According to a third aspect of embodiments of the present invention, there is provided a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the data processing method as described in the first aspect of the embodiments above.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a data processing method as described in the first aspect of the embodiments above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the technical solutions provided in some embodiments of the present invention, whether target data is expired is determined in response to an access request for the target data in a cache, and an update request for the target data is sent to a server through a message queue under the condition that the target data is expired, so as to update the expired target data according to an update response of the server to the update request. Therefore, the technical scheme can avoid the problem of buffer penetration caused by centralized penetration of access to the data source, and meanwhile, the client can acquire the updated target data, so that the actual requirement of the user for acquiring the target data is met, and the access experience of the user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic flow diagram of a data processing method according to an embodiment of the invention;
FIG. 2 shows a flow diagram of a method of generating an update request according to an embodiment of the invention;
FIG. 3 shows a flow diagram of a data processing method according to another embodiment of the invention;
FIG. 4 shows a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 5 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In the application scenario of internet e-commerce, especially in high-concurrency scenarios such as hot-sales goods, time-limited sales promotion discounts, etc., the access amount of the user in unit time is huge, so that the goods information needs to be cached by setting a cache component, and the data source server needs to be protected by directly accessing the cache component by the user. Meanwhile, the goods information provided to the user should be updated in real time, for example: in the time-limited sales promotion scene, the sales promotion commodities are sold out, but the user accesses the outdated error information of 'x commodities are left' and the like through the cache component, so that the data in the cache needs to be updated in real time, and therefore, when the user accesses the cache component, the data capable of reflecting the real situation can be obtained.
However, the technical solutions provided by the related arts cannot solve the problem of updating the data in the cache.
Fig. 1 is a flow chart illustrating a data processing method according to an embodiment of the present invention, which at least partially overcomes the problem that the related art cannot update data in a cache. The execution subject of this embodiment is a device for caching data, and may be, for example, a cache server.
Referring to fig. 1, the data processing method provided in this embodiment includes:
step S101, responding to an access request of target data in a cache, and judging whether the target data is overdue;
step S102, if the target data is expired, sending an updating request for the target data to a server through a message queue; and the number of the first and second groups,
step S103, receiving the update response of the server to the update request, and updating the target data according to the update response.
In the technical solution provided in the embodiment shown in fig. 1, whether the target data is expired is determined in response to an access request for the target data in the cache, and an update request for the target data is sent to the server through the message queue under the condition that the target data is expired, so that the expired target data is updated according to an update response of the server to the update request. Therefore, the technical scheme can avoid the problem of buffer penetration caused by centralized penetration of access to the data source, and meanwhile, the client can acquire the updated target data, so that the actual requirement of the user for acquiring the target data is met, and the access experience of the user is improved.
The specific implementation of the steps of the embodiment shown in fig. 1 is described in detail below:
in an exemplary embodiment, the data in the cache is updated in order to satisfy the user's access to the data updated in real time. The solution can be as follows: setting a life cycle for the data in the cache according to actual needs, and storing the data to be updated after the time corresponding to the life cycle. And when receiving an access request for the data, updating the data in the cache in a source returning mode. For example, the data structure in the cache may be a structure containing: the data management system comprises a data body, a data identification and a data life cycle, wherein whether the data body is expired is determined by counting down the life cycle. Thus, in response to an access request for target data in the cache in step S101, whether the target data is expired can be determined by whether the countdown to the life cycle of the target data is zero.
The method of counting down the life cycle may be to count down to zero from the maximum value of the life cycle of the data.
In an exemplary embodiment, the life cycles of different target data differ. In step S101, the specific implementation manner of determining whether the target data is expired may also be: respectively presetting life cycles for different target data to count down the different target data respectively, and determining whether the different target data are out of date according to the count down. Therefore, the life cycle of each target data is counted down, and when the accessed overdue target data exists, the data is returned to the source. Therefore, in the technical scheme provided by this embodiment, an asynchronous source return processing mode is adopted, which is beneficial to reducing the possibility of centralized source return, thereby playing a role in relieving the pressure of the server.
In an exemplary embodiment, if it is determined in step S101 that the target data has expired (e.g., the countdown to the life cycle of the target data is zero), an update request for the target data is sent to the server through the message queue in step S102. The method transmits the update request to the server in a message queue communication mode, and is beneficial to the separation design and loose coupling of the server and the cache.
In an exemplary embodiment, after receiving the update request for the target data, the server obtains the latest state of the data according to the identifier of the target data. For example, the target data is stored in a key-value form, and the server acquires the latest state of the value according to the key of the target data. Further, an update response as the update request is sent to a cache.
In an exemplary embodiment, the server transmits the update response corresponding to the update request in a message queue communication manner, which is beneficial to the separation design and loose coupling of the server and the cache.
In an exemplary embodiment, fig. 2 shows a flowchart of a method for generating an update request according to an embodiment of the present invention, and is specifically used to describe an achievable way of sending an update request for the target data to a server through a message queue in step S102.
Referring to fig. 2, the method for generating an update request in this embodiment includes:
step S201, according to the identification of the target data in the access request, filtering the access request corresponding to the same identification;
step S202, responding to the filtered access request, and generating an updating request; and the number of the first and second groups,
step S203, adding the update request into a message queue.
In an exemplary embodiment, access requests corresponding to the same identifier are filtered, and the filtered access requests are generated into update requests. Specifically, the access request includes an identifier of the target data, and for the data identified as a in the cache, after the data life cycle countdown is zero, the { S arranged in time sequence is received1,S2,…,StT access requests including the identifier a, the access request S received first in time sequence is retained in this embodiment1And according to the access request S1An update request for data identified as a is generated. And further, the update request is placed in a message queue and sent to a server, namely a data source server.
In an exemplary embodiment, the message may also be transmitted via a message queue,and filtering the access requests corresponding to the same identifier, and generating an updating request from the filtered access requests. Specifically, the first access request S is obtained1Marking and according to the access request S obtained after filtering1An update request is generated. And, when a subsequent access request containing identifier a { S2,…,StWhen the access request arrives, the subsequent access request is not received any more by judging that the access request contains the marked identifier a. Wherein the above logic of the message queue may be performed by other servers independent of the caching component (e.g., caching server, etc.). Therefore, the data source server is prevented from receiving repeated updating requests, and the pressure of the data source server is relieved. Meanwhile, the pressure of cache components (such as cache servers and the like) is relieved.
In an exemplary embodiment, the update request for the target data may be sent to the server through a message queue according to a preset frequency, so as to further facilitate relieving the pressure of the data source server.
In an exemplary embodiment, in step S103, an update response of the server to the update request is received, and the target data is updated according to the update response. Namely, receiving an update response corresponding to the update request containing the identifier a from the data source server, and further updating the data of the identifier a according to the update response. Therefore, the user can obtain the updated data from the cache, and the access requirement of the user is met while cache penetration is avoided.
In an exemplary embodiment, the implementation process of obtaining the latest value corresponding to the key in the target data (key-value) by the data source server is based on a java declarative annotation cut surface intrusion manner of the dynamic proxy, so that the data processing method provided by the embodiment is applicable to current mainstream cache components (e.g., Redis, JVM, and the like), and improves compatibility.
Fig. 3 is a schematic flow chart illustrating a data processing method according to another embodiment of the present invention, and referring to fig. 3, the data processing method provided by the present embodiment includes steps S301 to S308.
In step S301, an access request for target data in the cache is received.
In step S302, it is determined whether the target data is expired. If the target data is expired, executing step S303-step S307; if the target data is not expired, step S308 is executed.
In step S303, it is determined whether the target data is in a source return period. If the target data is not in the back-to-source period, which indicates that the target data has not been updated, executing step S304, step S305, and step S307; if the target data is in the back-to-source period, which indicates that the target data has not been updated, step S306 and step S307 are executed.
In step S304, an update request for the target data is sent to the server through the message queue. In step S305, an update response of the server to the update request is received, and the target data is updated according to the update response.
In the exemplary embodiment, the specific implementation process of step S304 is the same as step S102, and the specific implementation process of step S305 is the same as step S103, which is not described herein again.
In step S306, the waiting server returns an update response to the target data in a message queue to update the target data.
When the target data is in the back-to-source period, the update request is sent to the expired target data, but the update of the target data is not completed yet. For example: and the update response of the server is not received, or the update process of the target data is not completed after the update response is received, and the like. At this time, in order to avoid that the data source server receives repeated update requests to relieve the pressure of the data source server, the server side is waited to return an update response to the target data in a message queue manner to update the target data.
In step S307, the updated target data is transmitted as an update response corresponding to the access request.
In step S308, the target data is transmitted as a response to the update as corresponding to the access request. That is, under the condition that the target data is not expired, the target data does not need to be updated, and whether the target data is in the source returning period or not does not need to be judged, so that the target data to be accessed by the user is directly sent to the client of the user. Thus, the access requirements of the user are quickly met.
Embodiments of the apparatus of the present invention are described below, which can be used to perform the above-described data processing method of the present invention.
Fig. 4 shows a schematic configuration diagram of a data processing apparatus according to an embodiment of the present invention, and referring to fig. 4, the data processing apparatus 400 includes: a judging module 401, a sending module 402 and an updating module 403.
The determining module 401 is configured to determine, in response to an access request for target data, whether the target data is expired; the sending module 402 is configured to send an update request for the target data to a server through a message queue if the target data is expired; and the update module 403 is configured to receive an update response of the server to the update request, and update the target data according to the update response.
In the technical solution provided in the embodiment shown in fig. 4, the determining module 401 determines whether the target data is expired in response to the access request for the target data in the cache, and when the target data is expired, the sending module 402 sends an update request for the target data to the server through the message queue, and the updating module 403 updates the expired target data according to an update response of the server to the update request. Therefore, the technical scheme can avoid the problem of buffer penetration caused by centralized penetration of access to the data source, and meanwhile, the client can acquire the updated target data, so that the actual requirement of the user for acquiring the target data is met, and the access experience of the user is improved.
In an exemplary embodiment, the data in the cache is updated in order to satisfy the user's access to the data updated in real time. The solution can be as follows: setting a life cycle for the data in the cache according to actual needs, and storing the data to be updated after the time corresponding to the life cycle. And when receiving an access request for the data, updating the data in the cache in a source returning mode. For example, the data structure in the cache may be a structure containing: the data management system comprises a data body, a data identification and a data life cycle, wherein whether the data body is expired is determined by counting down the life cycle. Thus, the determining module 401 may determine whether the target data is expired by determining whether the countdown of the life cycle of the target data is zero in response to the access request for the target data in the cache.
In an exemplary embodiment, based on the foregoing scheme, the determining module 401 is specifically configured to: and counting down the preset life cycle of the target data, and determining whether the target data is out of date or not according to the counting down.
In an exemplary embodiment, based on the foregoing scheme, the determining module 401 is specifically configured to:
respectively presetting life cycles for different target data to count down the different target data respectively, and determining whether the different target data are out of date according to the count down.
The method of counting down the life cycle may be to count down to zero from the maximum value of the life cycle of the data.
In an exemplary embodiment, based on the foregoing scheme, before the sending module 402 sends the update request for the target data to the server through the message queue, the determining module 401 is further configured to: judging whether the target data is in a source returning period; if the target data is not in the back-to-source period, sending an update request for the target data to a server through a message queue; and if the target data is in the source returning period, waiting for the server to return an update response to the target data in a message queue mode so as to update the target data.
In an exemplary embodiment, the determining module 401 determines that the target data has expired (for example, a countdown to a life cycle of the target data is zero), and the sending module 402 sends an update request for the target data to the server through a message queue. The method transmits the update request to the server in a message queue communication mode, and is beneficial to the separation design and loose coupling of the server and the cache.
In an exemplary embodiment, based on the foregoing scheme, the sending module 402 includes: the device comprises a filtering unit, an updating request generating unit and a message queue adding unit.
The filtering unit is used for filtering the access requests corresponding to the same identification according to the identification of the target data in the access requests; the updating request generating unit is used for responding to the filtered access request and generating an updating request; and the message queue adding unit is used for adding the updating request into the message queue.
In an exemplary embodiment, based on the foregoing solution, the filtering unit is specifically configured to: for the same identification, the access request received first in time sequence is retained.
In an exemplary embodiment, the filtering unit filters the access requests corresponding to the same identifier, and the update request generating unit generates the filtered access requests into the update requests. Specifically, the access request includes an identifier of the target data, and for the data identified as a in the cache, after the data life cycle countdown is zero, the { S arranged in time sequence is received1,S2,…,StT access requests including the identifier a, the access request S received first in time sequence is retained in this embodiment1And according to the access request S1An update request for data identified as a is generated. And further, the message queue adding unit places the update request in a message queue and sends the update request to the data source server.
In an exemplary embodiment, the access requests corresponding to the same identifier may also be filtered through the message queue, and the filtered access requests may be generated into update requests. Specifically, the first access request S is obtained1Marking and rootingAccording to the access request S obtained after filtering1An update request is generated. And, when a subsequent access request containing identifier a { S2,…,StWhen the access request arrives, the subsequent access request is not received any more by judging that the access request contains the marked identifier a. Wherein the above logic of the message queue may be performed by other servers independent of the caching component (e.g., caching server, etc.). Therefore, the data source server is prevented from receiving repeated updating requests, and the pressure of the data source server is relieved. Meanwhile, the pressure of cache components (such as cache servers and the like) is relieved.
In an exemplary embodiment, based on the foregoing scheme, the sending module 402 is specifically configured to: and sending an update request for the target data to a server through a message queue according to a preset frequency so as to further facilitate the relief of the pressure of the data source server.
In an exemplary embodiment, after receiving the update request for the target data, the server obtains the latest state of the data according to the identifier of the target data. For example, the target data is stored in a key-value form, and the server acquires the latest state of the value according to the key of the target data. Further, an update response as the update request is sent to a cache.
In an exemplary embodiment, the server transmits the update response corresponding to the update request in a message queue communication manner, which is beneficial to the separation design and loose coupling of the server and the cache.
For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the above-described embodiments of the data processing method of the present invention for the respective functional modules of the data processing apparatus of the exemplary embodiment of the present invention correspond to the steps of the above-described exemplary embodiment of the data processing method.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing an electronic device of an embodiment of the present invention. The computer system 500 of the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of the use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for system operation are also stored. The CPU501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention 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 509, and/or installed from the removable medium 511. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention 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 invention, 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 the present invention, 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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the data processing method as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 1: step S101, responding to an access request to target data, and judging whether the target data is expired; step S102, if the target data is expired, sending an updating request for the target data to a server through a message queue; step S103, if the target data is expired, sending an update request for the target data to a server through a message queue.
As another example, the electronic device may implement the steps shown in fig. 2 or fig. 3.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (11)

1. A data processing method, comprising:
responding to an access request for target data in a cache, and judging whether the target data is expired;
if the target data is expired, sending an updating request for the target data to a server through a message queue;
and receiving an update response of the server to the update request, and updating the target data according to the update response.
2. The data processing method of claim 1, before sending an update request for the target data to a server via a message queue, further comprising:
judging whether the target data is in a source returning period;
and if the target data is not in the back source period, sending an update request for the target data to a server through a message queue.
3. The data processing method of claim 2, further comprising:
and if the target data is in the source returning period, waiting for the server to return an update response to the target data in a message queue mode so as to update the target data.
4. The data processing method of claim 1, wherein sending an update request for the target data to a server via a message queue comprises:
filtering the access requests corresponding to the same identification according to the identification of the target data in the access requests;
generating an update request in response to the filtered access request;
and adding the updating request into a message queue.
5. The data processing method of claim 4, wherein filtering access requests corresponding to the same identifier comprises:
for the same identification, the access request received first in time sequence is retained.
6. The data processing method of any one of claims 1 to 5, wherein sending an update request for the target data to a server via a message queue comprises:
and sending an update request of the target data to a server through a message queue according to a preset frequency.
7. The data processing method of claim 6, wherein determining whether the target data is expired comprises:
and counting down the preset life cycle of the target data, and determining whether the target data is out of date or not according to the counting down.
8. The data processing method of claim 1, wherein determining whether the target data is expired comprises:
respectively presetting life cycles for different target data to count down the different target data respectively, and determining whether the different target data are out of date according to the count down.
9. A data processing apparatus, comprising:
the judging module is used for responding to an access request of target data and judging whether the target data is overdue or not;
the sending module is used for sending an updating request of the target data to a server through a message queue if the target data is expired;
and the updating module is used for receiving an updating response of the server to the updating request and updating the target data according to the updating response.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the data processing method of any one of claims 1 to 8.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a data processing method according to any one of claims 1 to 8.
CN201811528567.0A 2018-12-13 2018-12-13 Data processing method, device, medium and electronic equipment Pending CN111324615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811528567.0A CN111324615A (en) 2018-12-13 2018-12-13 Data processing method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811528567.0A CN111324615A (en) 2018-12-13 2018-12-13 Data processing method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111324615A true CN111324615A (en) 2020-06-23

Family

ID=71168468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811528567.0A Pending CN111324615A (en) 2018-12-13 2018-12-13 Data processing method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111324615A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079474A (en) * 2021-04-15 2021-07-06 浙江航芯科技有限公司 Communication method and system between equipment and server
CN113486013A (en) * 2021-07-06 2021-10-08 中国工商银行股份有限公司 Application data processing method and device
CN113742617A (en) * 2020-08-28 2021-12-03 北京沃东天骏信息技术有限公司 Cache updating method and device
CN113760982A (en) * 2021-01-18 2021-12-07 西安京迅递供应链科技有限公司 Data processing method and device
CN113885902A (en) * 2021-08-23 2022-01-04 北京房江湖科技有限公司 Application program interface updating method
CN114936216A (en) * 2022-07-01 2022-08-23 北京奇艺世纪科技有限公司 Data updating method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130332782A1 (en) * 2012-06-07 2013-12-12 International Business Machines Corporation Background buffering of content updates
CN104980455A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Multi-terminal data synchronization method based on cloud storage, device and system thereof
CN105471716A (en) * 2015-12-17 2016-04-06 网易(杭州)网络有限公司 Method for achieving message synchronization across clients, user equipment and server
CN107992489A (en) * 2016-10-26 2018-05-04 腾讯科技(北京)有限公司 A kind of data processing method and server
CN108334505A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 A kind of data processing method, device, server and inventory system
CN108694075A (en) * 2017-04-12 2018-10-23 北京京东尚科信息技术有限公司 Handle method, apparatus, electronic equipment and the readable storage medium storing program for executing of report data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130332782A1 (en) * 2012-06-07 2013-12-12 International Business Machines Corporation Background buffering of content updates
CN104980455A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Multi-terminal data synchronization method based on cloud storage, device and system thereof
CN105471716A (en) * 2015-12-17 2016-04-06 网易(杭州)网络有限公司 Method for achieving message synchronization across clients, user equipment and server
CN107992489A (en) * 2016-10-26 2018-05-04 腾讯科技(北京)有限公司 A kind of data processing method and server
CN108334505A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 A kind of data processing method, device, server and inventory system
CN108694075A (en) * 2017-04-12 2018-10-23 北京京东尚科信息技术有限公司 Handle method, apparatus, electronic equipment and the readable storage medium storing program for executing of report data

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113742617A (en) * 2020-08-28 2021-12-03 北京沃东天骏信息技术有限公司 Cache updating method and device
CN113760982A (en) * 2021-01-18 2021-12-07 西安京迅递供应链科技有限公司 Data processing method and device
CN113760982B (en) * 2021-01-18 2024-05-17 西安京迅递供应链科技有限公司 Data processing method and device
CN113079474A (en) * 2021-04-15 2021-07-06 浙江航芯科技有限公司 Communication method and system between equipment and server
CN113486013A (en) * 2021-07-06 2021-10-08 中国工商银行股份有限公司 Application data processing method and device
CN113885902A (en) * 2021-08-23 2022-01-04 北京房江湖科技有限公司 Application program interface updating method
CN114936216A (en) * 2022-07-01 2022-08-23 北京奇艺世纪科技有限公司 Data updating method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111324615A (en) Data processing method, device, medium and electronic equipment
US11146502B2 (en) Method and apparatus for allocating resource
US10572385B2 (en) Granting exclusive cache access using locality cache coherency state
US10331669B2 (en) Fast query processing in columnar databases with GPUs
CN113010818B (en) Access current limiting method, device, electronic equipment and storage medium
CN109388626B (en) Method and apparatus for assigning numbers to services
CN107835181B (en) Authority management method, device and medium of server cluster and electronic equipment
CN109766319B (en) Compression task processing method and device, storage medium and electronic equipment
CN111066005B (en) Asynchronous updating of metadata tracks in response to cache hits generated via I/O operations on a bus interface
CN110909022A (en) Data query method and device
CN113157216B (en) Method, apparatus and computer readable storage medium for storage management
CN115421922A (en) Current limiting method, device, equipment, medium and product of distributed system
CN113722114A (en) Data service processing method and device, computing equipment and storage medium
CN110928594A (en) Service development method and platform
CN112819638A (en) Transaction weight judging method, device, equipment and computer readable medium
CN112884181A (en) Quota information processing method and device
CN112948138A (en) Method and device for processing message
WO2019070343A1 (en) Identifying and consenting to permissions for workflow and code execution
CN113486116A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN109213815B (en) Method, device, server terminal and readable medium for controlling execution times
CN111897822A (en) Account state information processing method and device, electronic equipment and storage medium
US11514016B2 (en) Paging row-based data stored as objects
CN111046430B (en) Data processing method and device, storage medium and electronic equipment
CN110430263B (en) Value added service processing system and method
US10884832B2 (en) Aggregation messaging within an integration environment

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