CN110858201B - Data processing method and system, processor and storage medium - Google Patents

Data processing method and system, processor and storage medium Download PDF

Info

Publication number
CN110858201B
CN110858201B CN201810972376.7A CN201810972376A CN110858201B CN 110858201 B CN110858201 B CN 110858201B CN 201810972376 A CN201810972376 A CN 201810972376A CN 110858201 B CN110858201 B CN 110858201B
Authority
CN
China
Prior art keywords
data
request
target object
target
target data
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
CN201810972376.7A
Other languages
Chinese (zh)
Other versions
CN110858201A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810972376.7A priority Critical patent/CN110858201B/en
Publication of CN110858201A publication Critical patent/CN110858201A/en
Application granted granted Critical
Publication of CN110858201B publication Critical patent/CN110858201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The application discloses a data processing method and system, a processor and a storage medium. Wherein the method comprises the following steps: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache. The technical problem that throughput capacity of a database in the prior art is poor is solved.

Description

Data processing method and system, processor and storage medium
Technical Field
The present invention relates to the field of internet, and in particular, to a data processing method and system, a processor, and a storage medium.
Background
In the internet of things suite, the time reported by the equipment is frequently updated to DB (database, which is called as Data Base in full), and because DB is limited by the number of updated SQL (structured query language, which is called as Structured Query Language in full), the whole DB response is greatly influenced during high-frequency access.
Aiming at the problem of poor throughput of a database in the prior art, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the application provides a data processing method and system, a processor and a storage medium, which are used for at least solving the technical problem of poor throughput of a database in the prior art.
According to an aspect of the embodiments of the present application, there is provided a data processing method, including: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache.
According to another aspect of the embodiments of the present application, there is also provided a data processing method, including: acquiring a data request initiated by a first target object for accessing a second target object, wherein the data request comprises an identifier of target data; inquiring whether an identifier exists in a preset service configuration list; and processing the target data in the preset cache under the condition that the identifier exists in the service configuration list.
According to another aspect of the embodiments of the present application, there is further provided a storage medium, where the storage medium includes a stored program, and when the program runs, the device on which the storage medium is controlled to execute the above-mentioned data processing method.
According to another aspect of the embodiments of the present application, there is further provided a processor, configured to execute a program, where the program executes the data processing method described above.
According to another aspect of the embodiments of the present application, there is also provided a data processing system, including: a processor; and a memory, coupled to the processor, for providing instructions to the processor for processing the steps of: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache.
According to another aspect of the embodiments of the present application, there is also provided a data processing method, including: acquiring a read request initiated by a first target object for reading target data in a second target object, wherein the read request contains an identifier of the target data; inquiring whether an identifier exists in a preset service configuration list; if the identifier exists in the service configuration list, acquiring a request parameter corresponding to the read request; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading target data from the preset cache, and sending the target data to a first target object; if the hash result does not exist in the preset cache, reading target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
According to another aspect of the embodiments of the present application, there is also provided a data processing method, including: acquiring request parameters, wherein the request parameters are parameters corresponding to a write request initiated by a first target object, the write request is used for writing target data into a second target object, and the write request contains the target data; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, writing target data in the preset cache; and writing the data in the preset cache into the second target object at regular time.
In this embodiment of the present application, after obtaining a request parameter corresponding to a data request of a first target object to access a second target object, hash processing may be performed on the request parameter to obtain a hash result corresponding to the request parameter, further determine whether a hash result exists in a preset cache, and if so, may read or write target data indicated by the data request in the preset cache.
According to the scheme provided by the embodiment of the application, when the first target object accesses the second target object, whether the target data are read or written in the preset buffer can be determined by judging whether the hash result corresponding to the request parameter exists in the preset buffer, and compared with the prior art, the first target object does not need to read or write the target data in the second target object every time, so that the throughput capacity of the database is improved, the data processing time is shortened, the technical effects of the experience and the good sensitivity of a user are improved, and the technical problem that the throughput capacity of the database in the prior art is poor is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a hardware configuration block diagram of a computer terminal (or mobile device) for implementing a data processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of a data processing method according to embodiment 1 of the present application;
FIG. 3 is a schematic diagram of an alternative data processing method in the case of read services according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative method of data processing in the case of a write service, according to an embodiment of the present application;
FIG. 5 is a flow chart of a data processing method according to embodiment 2 of the present application;
FIG. 6 is a flow chart of a data processing method according to embodiment 3 of the present application;
FIG. 7 is a flow chart of a data processing method according to embodiment 4 of the present application;
FIG. 8 is a schematic view of a data processing apparatus according to embodiment 5 of the present application;
FIG. 9 is a schematic view of a data processing apparatus according to embodiment 6 of the present application;
FIG. 10 is a schematic view of a data processing apparatus according to embodiment 7 of the present application;
FIG. 11 is a schematic view of a data processing apparatus according to embodiment 8 of the present application;
fig. 12 is a block diagram of a computer terminal according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, partial terms or terminology appearing in describing embodiments of the present application are applicable to the following explanation:
cache: and the cache comprises a distributed cache and a local cache.
Hash algorithm: a function that compresses messages of arbitrary length to a message digest of some fixed length.
AOP: a java interception technology processes special logic after request and response.
Example 1
In accordance with the embodiments of the present application, there is provided an embodiment of a data processing method, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
The method embodiment provided in the first embodiment of the present application may be executed in a mobile terminal, a computer terminal or a similar computing device. Fig. 1 shows a block diagram of a hardware architecture of a computer terminal (or mobile device) for implementing a data processing method. As shown in fig. 1, the computer terminal 10 (or mobile device 10) may include one or more (shown as 102a, 102b, … …,102 n) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU, a programmable logic device FPGA, etc. processing means), a memory 104 for storing data, and a transmission means 106 for communication functions. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors 102 and/or other data processing circuits described above may be referred to generally herein as "data processing circuits. The data processing circuit may be embodied in whole or in part in software, hardware, firmware, or any other combination. Furthermore, the data processing circuitry may be a single stand-alone processing module, or incorporated, in whole or in part, into any of the other elements in the computer terminal 10 (or mobile device). As with the processors referred to in the embodiments of the present application, the data processing circuitry acts as a processor control (e.g., selection of the path of the variable resistor termination connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the data processing methods in the embodiments of the present application, and the processor 102 executes the software programs and modules stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the data processing methods described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
It should be noted here that, in some alternative embodiments, the computer device (or mobile device) shown in fig. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a specific example, and is intended to illustrate the types of components that may be present in the computer device (or mobile device) described above.
In the above-described operating environment, the present application provides a data processing method as shown in fig. 2. Fig. 2 is a flowchart of a data processing method according to embodiment 1 of the present application. As shown in fig. 2, the method comprises the steps of:
step S202, obtaining request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object.
The first target object in the step S202 may be an upper layer service in the network, a lower layer service in the network may issue a plurality of services, and the second target object may be any one of the services or the database issued by the lower layer service, and the upper layer service may access the service or the database issued by the lower layer service by initiating a data request. In order to accurately determine the second target object, when the first target object initiates the data request, the data request carries corresponding parameters, for example, an ID of a lower layer service, an ID of a service to be accessed, an address of a database, an ID of the database, an ID of a data table stored in the database, a field name in the data table, and the like.
Optionally, the data request includes: a read request, a write request; the read request is used for reading target data in the second target object, the read request comprises identification of the target data, the write request is used for writing the target data into the second target object, and the write request comprises the target data.
The target data may be data that needs to be read from the second target object or data that needs to be written to the second target object. Since the lower layer service issues a plurality of services, in order to accurately determine the second target object, the read request may carry an identifier of the target data, that is, an identifier of the second target object, where the identifier may uniquely represent the second target object, for example, may be an ID, and each service is set with a unique ID. In order to implement writing data to the second target object, the write request may carry the data to be written.
Step S204, hash processing is carried out on the request parameters to obtain hash results corresponding to the request parameters.
The Hash result in the step S204 may be a processing result obtained by performing a Hash process on the request parameter. Because the request parameters corresponding to the data request initiated by the first target object contain more parameters, in order to reduce the processing time of the request parameters, hash processing can be performed on the request parameters, and a corresponding Hash result is obtained.
Step S206, judging whether a hash result exists in the preset cache.
The preset Cache in the step S206 may be a local Cache, and the data in the second target object may be stored in the local Cache in advance, so that the first target object is convenient to read directly, and the second target object is not required to read, so that the response time of the first target object is reduced; alternatively, when the first target object needs to write data, the data to be written may be first stored in the local cache, and then written from the local cache into the second target object when idle, thereby reducing the access frequency of the second target object.
In order to confirm whether the first target object can directly access the local cache or not, the method can be realized by judging whether a Hash result exists in the local cache or not, if the Hash result exists in the local cache, the corresponding data stored in the local cache can be determined, the first target object can directly access the local cache to acquire the corresponding data or write the corresponding data into the local cache, and the purpose of updating the data originally stored in the local cache is realized.
In step S208, if the hash result exists in the preset buffer, the target data indicated by the data request is read or written in the preset buffer.
After determining that the Hash result exists in the local cache, the first target object can directly access the local cache without accessing the second target object, and reading the data of the second target object from the local cache or writing the data of the second target object into the local cache. For read requests, the format of the data stored in the local cache may be key-key-value, e.g., cache-target data that may be an ID-request parameter of the service; for write requests, the format of the data stored in the local cache may be key-value, e.g., cache-target data for the request parameters.
It should be noted that, in order to achieve that the first target object directly accesses the local Cache, but does not need to access the second target object, the data request initiated by the first target object may be intercepted by AOP interception, and the purpose of accessing the local Cache or the second target object is achieved by judging whether a Hash result exists in the local Cache.
For example, take the example that the first target object is service a and the second target object is a service or DB published by service B. When the data request is a read request, as shown in fig. 3, the service a may initiate a read request for accessing the service or DB issued by the service B, after the AOP intercepts the read request, may obtain a request parameter Hash result corresponding to the read request, and determine whether to locally Cache according to the request parameter Hash result, if so, may determine that the data to be read is stored in the local Cache, and may directly read the corresponding data from the local Cache.
For another example, still taking as an example a service or DB that the first target object is service a and the second target object is service B. When the data request is a write request, as shown in fig. 4, the service a may initiate a write request for accessing the service or DB issued by the service B, after the AOP intercepts the write request, may obtain a request parameter Hash result corresponding to the write request, and determine whether to locally Cache according to the request parameter Hash result, if so, may determine that the written data needs to be stored in the local Cache, and may write the corresponding data into the local Cache.
Based on the scheme defined in the foregoing embodiment, it may be known that after the request parameter corresponding to the data request of the first target object for accessing the second target object is obtained, hash processing may be performed on the request parameter to obtain a hash result corresponding to the request parameter, further determine whether the hash result exists in the preset cache, and if so, may read or write the target data indicated by the data request in the preset cache.
According to the scheme provided by the embodiment of the application, when the first target object accesses the second target object, whether the target data are read or written in the preset buffer can be determined by judging whether the hash result corresponding to the request parameter exists in the preset buffer, and compared with the prior art, the first target object does not need to read or write the target data in the second target object every time, so that the throughput capacity of the database is improved, the data processing time is shortened, the technical effects of the experience and the good sensitivity of a user are improved, and the technical problem that the throughput capacity of the database in the prior art is poor is solved.
In an optional embodiment provided in the present application, before obtaining the request parameter in the case where the data request is a read request, the method further includes: acquiring a read request; inquiring whether the identification of the target data exists or not from a preset service configuration list; and if the identifier exists in the service configuration list, executing the acquisition request parameter.
The service configuration list may be an update cache list of a pre-configured update read request, and is set in the distributed resource manager, where the service configuration list includes an ID of a service issued by a lower layer service.
After the AOP intercepts the read request initiated by the first target object, it may first query whether the service configuration list has an ID of the service to be accessed, if so, it indicates that the service to be accessed by the first target object is a service published by the lower layer service, and further determine whether to read or write the target data from the local cache according to the request parameter.
For example, still taking as an example a service or DB published by the first target object being service a and the second target object being service B. When the data request is a read request, as shown in fig. 3, the service a may initiate a read request for accessing the service or DB issued by the service B, after the AOP intercepts the read request, it may first determine whether to enter the local Cache for the service configuration list, that is, determine whether the ID of the service exists in the service configuration list, if so, further obtain a request parameter Hash result corresponding to the read request, and determine whether to be in the local Cache according to the request parameter Hash result.
In an optional embodiment provided herein, the method further includes: if the service configuration list does not have the identification, reading target data from the second target object, writing the target data into a preset cache, and sending the target data to the first target object.
After the AOP intercepts the read request initiated by the first target object, it may first query whether the service configuration list has an ID of the service to be accessed, if not, it indicates that the service to be accessed by the second target object is not a service published by the lower layer service, further may read the target data from the second target object, and store the read data in the local cache, so as to facilitate the next reading and use of the first target object.
For example, still taking as an example a service or DB published by the first target object being service a and the second target object being service B. When the data request is a read request, as shown in fig. 3, the service a may initiate a read request for accessing the service or DB issued by the service B, and after the AOP intercepts the read request, it may first determine whether to enter the local cache for the service configuration list, that is, determine whether the ID of the service exists in the service configuration list, and if not, may directly read the corresponding data from the service B/DB.
In an optional embodiment provided in the present application, the target data indicated by the read or write data request in the preset cache includes: and reading target data from the preset cache and sending the target data to the first target object.
After the AOP intercepts the read request initiated by the first target object, it may first query whether an ID of a service to be accessed exists in the service configuration list, if so, it may further determine whether to read the target data from the local cache according to the request parameter, and if it is determined that the target data is read from the local storage, it may directly access the local cache to obtain the target data, and generate a response and return the response to the first target object.
In an optional embodiment provided herein, the method further includes: if the hash result does not exist in the preset cache, reading target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
After the AOP intercepts a read request initiated by the first target object, if the fact that a Hash result does not exist in the local cache is determined, the first target object can be determined not to directly access the local cache, but to access the second target object, target data can be read from the second target object, and the read data is stored in the local cache, so that the first target object can be conveniently read and used next time.
For example, still taking as an example a service or DB published by the first target object being service a and the second target object being service B. When the data request is a read request, as shown in fig. 3, the service a may initiate a read request for accessing a service or DB issued by the service B, after the AOP intercepts the read request, may obtain a request parameter Hash result corresponding to the read request, and determine whether to locally Cache according to the request parameter Hash result, if not, may determine that the data to be read is stored in the service B/DB, may read the corresponding data from the service B/DB, and store the corresponding data in the local Cache, so that the corresponding data may be directly read from the local Cache next time.
In an optional embodiment provided in the present application, in a case where the data request is a write request, reading or writing, in a preset cache, target data indicated by the data request includes: and writing target data in the write request into a preset buffer, wherein the target data corresponds to the hash result.
After the AOP intercepts a write request initiated by a first target object, if the fact that a Hash result exists in a local cache is determined, target data can be directly written into the local cache, and the target data and a request parameter Hash result are correspondingly stored.
In an optional embodiment provided in the present application, after writing the target data in the write request into the preset cache, the method further includes: and writing the data in the preset cache into the second target object at regular time.
After the target data is written into the local buffer, in order that the target data may be stored in the second target object, the data in the local buffer may be written into the second target object at regular time, so as to realize synchronization between the local buffer and the second target object. And the data in the local cache is not required to be written into the second target object in real time, so that the purposes of reducing the cost of the database and improving the throughput capacity of the database are achieved.
The timing described above may be timing in units of minutes, but is not limited thereto, and may be determined according to throughput capability of the database.
For example, still taking as an example a service or DB published by the first target object being service a and the second target object being service B. When the data request is a write request, the final result may be periodically refreshed and written to the service B/DB after the responsive data is written to the local Cache, as shown in fig. 4.
In an optional embodiment provided herein, the method further includes: if the hash result does not exist in the preset cache, writing the target data in the write request into the second target object.
After the AOP intercepts the write request initiated by the first target object, if it is determined that the Hash result does not exist in the local cache, it may be determined that the first target object does not directly access the local cache, but accesses the second target object, and the target data may be written into the second target object.
For example, still taking as an example a service or DB published by the first target object being service a and the second target object being service B. When the data request is a write request, as shown in fig. 4, the service a may initiate a write request for accessing a service or DB issued by the service B, after the AOP intercepts the write request, may obtain a request parameter Hash result corresponding to the write request, and determine whether to locally cache according to the request parameter Hash result, if not, it may be determined that the written data needs to be stored in the service B/DB, and may directly write the corresponding data into the service B/DB.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
Example 2
In accordance with the embodiments of the present application, there is also provided an embodiment of a data processing method, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 5 is a flowchart of a data processing method according to embodiment 2 of the present application. As shown in fig. 5, the method comprises the steps of:
step S502, a data request initiated by a first target object for accessing a second target object is obtained, wherein the data request contains an identification of target data.
The first target object in the step S502 may be an upper layer service in the network, a lower layer service in the network may issue a plurality of services, and the second target object may be any one of the services or the database issued by the lower layer service, and the upper layer service may access the service or the database issued by the lower layer service by initiating a data request. The target data may be data that needs to be read from or written to the second target object. Since the lower layer service issues a plurality of services, in order to accurately determine the second target object, the data request may carry an identifier of the target data, that is, an identifier of the second target object, where the identifier may uniquely represent the second target object, for example, may be an ID, and each service is set with a unique ID.
Optionally, the data request includes: a read request, a clear data request; the read request is used for reading target data in the second target object, the read request comprises identification of the target data, the clear data request is used for indicating to clear the target data in the preset cache, and the clear data request comprises identification of the target data.
The above-mentioned cleaning data request is used for storing the service data stored in the local cache, where the local cache stores a plurality of service data, in order to ensure that the cleaning of correct data is performed, the cleaning data request may carry an identifier of the target data, where the identifier may uniquely represent the target data, for example, may be an ID, and the target data of each service is set with a unique ID.
Step S504, inquiring whether the identification exists from a preset service configuration list.
The service configuration list in step S504 may be an update cache list of a pre-configured update read request, which is set in the distributed resource manager, and the service configuration list includes the IDs of the services issued by the lower layer services.
After the data request initiated by the first target object is acquired, it may be first queried whether an ID of a service to be accessed exists in the service configuration list, and if so, it indicates that the service to be accessed by the first target object is a service published by the lower layer service.
In step S506, in the case that the identifier exists in the service configuration list, the target data is processed in the preset buffer.
The preset Cache in step S506 may be a local Cache, and the data in the second target object may be stored in the local Cache in advance, so that the first target object is convenient to read directly, and the second target object is not required to read, so that the response time of the first target object is reduced; or when the first target object needs to clear the data stored in the local cache, the target data stored in the local cache can be processed.
For example, take the example that the first target object is service a and the second target object is a service or DB published by service B. When the data request is a read request, as shown in fig. 3, the service a may initiate a read request for accessing a service or DB issued by the service B, after intercepting the read request by the AOP, may first determine whether to enter a local Cache with respect to the service configuration list, that is, determine whether an ID of the service exists in the service configuration list, if so, may further obtain a request parameter Hash result corresponding to the read request, and read corresponding data from the local Cache or the service B/DB according to the request parameter Hash result.
For another example, still taking as an example a service or DB that the first target object is service a and the second target object is service B. When the data request is a read request, as shown in fig. 3, the service a may initiate a request for cleaning the data of the service or DB issued by the access service B stored in the local Cache, and after the AOP intercepts the request, it may determine whether to enter the local Cache with respect to the service configuration list, that is, determine whether the ID of the service exists in the service configuration list, and if so, clean the data of the service in the local Cache.
Based on the scheme defined in the foregoing embodiment, it may be known that after the data request initiated by the first target object for accessing the second target object is acquired, whether the identifier of the target data included in the data request exists may be queried from the preset service configuration list, and if so, the target data may be processed in the preset cache.
According to the scheme provided by the embodiment of the application, when the first target object accesses the second target object, the target data can be processed in the preset cache under the condition that the identification of the target data exists in the query of the preset service configuration list is determined.
In an optional embodiment provided in the present application, in a case where the data request is a read request, and in a case where there is an identifier in the service configuration list, the method further includes: acquiring request parameters corresponding to a read request; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading target data from the preset cache, and sending the target data to a first target object; if the hash result does not exist in the preset cache, reading target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
In order to accurately determine the second target object, when the first target object initiates the data request, the data request carries corresponding parameters, for example, an ID of a lower layer service, an ID of a service to be accessed, an address of a database, an ID of the database, an ID of a data table stored in the database, a field name in the data table, and the like.
The Hash result may be a processing result obtained by performing Hash processing on the request parameter. Because the request parameters corresponding to the data request initiated by the first target object contain more parameters, in order to reduce the processing time of the request parameters, hash processing can be performed on the request parameters, and a corresponding Hash result is obtained.
In order to confirm whether the first target object can directly access the local cache, whether the local cache has a Hash result or not can be judged, if the local cache has the Hash result, corresponding data can be determined to be stored in the local cache, and the first target object can directly access the local cache to acquire the corresponding data.
After determining that the Hash result exists in the local cache, the first target object can directly access the local cache without accessing the second target object, and reading the data of the second target object from the local cache; after determining that the Hash result does not exist in the local cache, the first target object can be determined not to directly access the local cache, but to access the second target object, target data can be read from the second target object, and the read data is stored in the local cache, so that the first target object can be conveniently read and used next time.
In an optional embodiment provided herein, the method further includes: and under the condition that the identifier does not exist in the service configuration list, reading target data from the second target object, writing the target data into a preset cache, and sending the target data to the first target object.
After the AOP intercepts the read request initiated by the first target object, it may first query whether the service configuration list has an ID of the service to be accessed, if not, it indicates that the service to be accessed by the second target object is not a service published by the lower layer service, further may read the target data from the second target object, and store the read data in the local cache, so as to facilitate the next reading and use of the first target object.
In an optional embodiment provided in the present application, in a case where the data request is a clean data request, processing the target data in the preset cache includes: and cleaning target data corresponding to the identification from a preset cache.
The format of the data stored in the preset cache may be key-key-value, for example, cache-target data of the ID-request parameter of the service. After the AOP intercepts the data cleaning request initiated by the first target object, if the identification exists in the service configuration list, the target data corresponding to the service ID in the local cache can be cleaned.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 3
In accordance with the embodiments of the present application, there is also provided an embodiment of a data processing method, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 6 is a flowchart of a data processing method according to embodiment 3 of the present application. As shown in fig. 6, the method includes the steps of:
in step S602, a read request initiated by the first target object for reading target data in the second target object is obtained, where the read request includes an identifier of the target data.
Step S604, inquiring whether the identification exists from a preset service configuration list.
Step S606, if there is an identification in the service configuration list, acquiring the request parameters corresponding to the read request.
Step S608, hash processing is performed on the request parameters to obtain hash results corresponding to the request parameters.
Step S610, judging whether a hash result exists in the preset cache.
In step S612, if the hash result exists in the preset buffer, the target data is read from the preset buffer, and the target data is sent to the first target object.
In step S614, if the hash result does not exist in the preset buffer, the target data is read from the second target object, and the target data is written into the preset buffer and sent to the first target object.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 4
In accordance with the embodiments of the present application, there is also provided an embodiment of a data processing method, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 7 is a flowchart of a data processing method according to embodiment 4 of the present application. As shown in fig. 7, the method includes the steps of:
in step S702, a request parameter is obtained, where the request parameter is a parameter corresponding to a write request initiated by a first target object, where the write request is used to write target data into a second target object, and the write request includes the target data.
Step S704, hash processing is carried out on the request parameters to obtain hash results corresponding to the request parameters.
Step S706, judging whether the hash result exists in the preset cache.
In step S708, if the hash result exists in the preset buffer, the target data is written into the preset buffer.
In step S710, the data in the preset buffer is written into the second target object at regular time.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 5
There is further provided, according to an embodiment of the present application, a data processing apparatus for implementing the above data processing method, as shown in fig. 8, the apparatus 800 includes:
the obtaining module 802 is configured to obtain a request parameter, where the request parameter is a parameter corresponding to a data request initiated by a first target object, and the data request is used to access a second target object.
The processing module 804 is configured to perform hash processing on the request parameter to obtain a hash result corresponding to the request parameter.
A judging module 806, configured to judge whether a hash result exists in the preset cache.
The read-write module 808 is configured to read or write the target data indicated by the data request in the preset buffer if the hash result exists in the preset buffer.
Here, it should be noted that the above-mentioned obtaining module 802, processing module 804, judging module 806 and reading and writing module 808 correspond to steps S202 to S208 in embodiment 1, and the four modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in embodiment 1. It should be noted that the above-described module may be operated as a part of the apparatus in the computer terminal 10 provided in embodiment 1.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 6
There is further provided, according to an embodiment of the present application, a data processing apparatus for implementing the above data processing method, as shown in fig. 9, where the apparatus 900 includes:
an obtaining module 902, configured to obtain a data request initiated by the first target object for accessing the second target object, where the data request includes an identifier of the target data.
And a query module 904, configured to query whether an identifier exists in a preset service configuration list.
And a processing module 906, configured to process the target data in the preset cache if the identifier exists in the service configuration list.
Here, it should be noted that the above-mentioned obtaining module 902, querying module 904, and processing module 906 correspond to steps S502 to S506 in embodiment 2, and the three modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in embodiment 2 above. It should be noted that the above-described module may be operated as a part of the apparatus in the computer terminal 10 provided in embodiment 1.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 7
There is further provided, according to an embodiment of the present application, a data processing apparatus for implementing the above data processing method, as shown in fig. 10, where the apparatus 1000 includes:
the first obtaining module 1002 is configured to obtain a read request initiated by the first target object for reading target data in the second target object, where the read request includes an identifier of the target data.
And a query module 1004, configured to query whether an identifier exists in a preset service configuration list.
The second obtaining module 1006 is configured to obtain a request parameter corresponding to the read request if the identifier exists in the service configuration list.
And the processing module 1008 is configured to perform hash processing on the request parameter to obtain a hash result corresponding to the request parameter.
The judging module 1010 is configured to judge whether a hash result exists in the preset buffer.
The first reading module 1012 is configured to read the target data from the preset buffer and send the target data to the first target object if the hash result exists in the preset buffer.
And the second reading module 1014 is configured to read the target data from the second target object if the hash result does not exist in the preset buffer, write the target data into the preset buffer, and send the target data to the first target object.
Here, the first obtaining module 1002, the query module 1004, the second obtaining module 1006, the processing module 1008, the determining module 1010, the first reading module 1012, and the second reading module 1014 correspond to steps S602 to S614 in embodiment 3, and seven modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in embodiment 3. It should be noted that the above-described module may be operated as a part of the apparatus in the computer terminal 10 provided in embodiment 1.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 8
There is further provided, according to an embodiment of the present application, a data processing apparatus for implementing the above data processing method, as shown in fig. 11, an apparatus 1100 including:
the obtaining module 1102 is configured to obtain a request parameter, where the request parameter is a parameter corresponding to a write request initiated by a first target object, where the write request is used to write target data into a second target object, and the write request includes the target data.
The processing module 1104 is configured to perform hash processing on the request parameter to obtain a hash result corresponding to the request parameter.
The determining module 1106 is configured to determine whether a hash result exists in the preset cache.
The first writing module 1108 is configured to write the target data in the preset buffer if the hash result exists in the preset buffer.
And a second writing module 1110, configured to write the data in the preset buffer into the second target object at regular time.
It should be noted that, the above-mentioned obtaining module 1102, processing module 1104, judging module 1106, first writing module 1108 and second writing module 1110 correspond to steps S702 to S710 in embodiment 4, and the five modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in embodiment 4. It should be noted that the above-described module may be operated as a part of the apparatus in the computer terminal 10 provided in embodiment 1.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 9
There is further provided, in accordance with an embodiment of the present application, an embodiment of a data processing system, including:
a processor; and
a memory, coupled to the processor, for providing instructions to the processor for processing the steps of: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache.
It should be noted that, in the alternative or preferred real-time manner of this embodiment, reference may be made to the related description in embodiment 1, which is not described herein.
Example 10
Embodiments of the present application may provide a computer terminal, which may be any one of a group of computer terminals. Alternatively, in the present embodiment, the above-described computer terminal may be replaced with a terminal device such as a mobile terminal.
Alternatively, in this embodiment, the above-mentioned computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
In this embodiment, the above-mentioned computer terminal may execute the program code of the following steps in the data processing method: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache.
Alternatively, fig. 12 is a block diagram of a computer terminal according to an embodiment of the present application. As shown in fig. 12, the computer terminal a may include: one or more (only one is shown) processors 1202 and memory 1204.
The memory may be used to store software programs and modules, such as program instructions/modules corresponding to the data processing methods and apparatuses in the embodiments of the present application, and the processor executes the software programs and modules stored in the memory, thereby executing various functional applications and data processing, that is, implementing the data processing methods described above. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory remotely located with respect to the processor, which may be connected to terminal a through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor may call the information and the application program stored in the memory through the transmission device to perform the following steps: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache.
Optionally, the above processor may further execute program code for: the data request includes: a read request, a write request; the read request is used for reading target data in the second target object, the read request comprises identification of the target data, the write request is used for writing the target data into the second target object, and the write request comprises the target data.
Optionally, the above processor may further execute program code for: acquiring a read request before acquiring a request parameter under the condition that the data request is the read request; inquiring whether the identification of the target data exists or not from a preset service configuration list; and if the identifier exists in the service configuration list, executing the acquisition request parameter.
Optionally, the above processor may further execute program code for: if the service configuration list does not have the identification, reading target data from the second target object, writing the target data into a preset cache, and sending the target data to the first target object.
Optionally, the above processor may further execute program code for: and reading target data from the preset cache and sending the target data to the first target object.
Optionally, the above processor may further execute program code for: if the hash result does not exist in the preset cache, reading target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
Optionally, the above processor may further execute program code for: and under the condition that the data request is a write request, writing target data in the write request into a preset cache, wherein the target data corresponds to the hash result.
Optionally, the above processor may further execute program code for: after the target data in the write request is written into the preset cache, the data in the preset cache is written into the second target object at regular time.
Optionally, the above processor may further execute program code for: if the hash result does not exist in the preset cache, writing the target data in the write request into the second target object.
By adopting the embodiment of the application, a scheme for data processing is provided. When the first target object accesses the second target object, whether target data are read or written in the preset buffer can be determined by judging whether a hash result corresponding to the request parameter exists in the preset buffer, and compared with the prior art, the first target object does not need to read or write the target data in the second target object each time, so that the technical effects of improving the throughput capacity of a database, shortening the data processing time and improving the experience and the good sensitivity of a user are achieved, and the technical problem that the throughput capacity of the database in the prior art is poor is solved.
The processor may call the information and the application program stored in the memory through the transmission device to perform the following steps: acquiring a data request initiated by a first target object for accessing a second target object, wherein the data request comprises an identifier of target data; inquiring whether an identifier exists in a preset service configuration list; and processing the target data in the preset cache under the condition that the identifier exists in the service configuration list.
Optionally, the above processor may further execute program code for: the data request includes: a read request, a clear data request; the read request is used for reading target data in the second target object, the read request comprises identification of the target data, the clear data request is used for indicating to clear the target data in the preset cache, and the clear data request comprises identification of the target data.
Optionally, the above processor may further execute program code for: under the condition that the data request is a read request, acquiring a request parameter corresponding to the read request under the condition that an identifier exists in a service configuration list; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading target data from the preset cache, and sending the target data to a first target object; if the hash result does not exist in the preset cache, reading target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
Optionally, the above processor may further execute program code for: and under the condition that the identifier does not exist in the service configuration list, reading target data from the second target object, writing the target data into a preset cache, and sending the target data to the first target object.
Optionally, the above processor may further execute program code for: and under the condition that the data request is a data clearing request, clearing target data corresponding to the identification from a preset cache.
The processor may call the information and the application program stored in the memory through the transmission device to perform the following steps: acquiring a read request initiated by a first target object for reading target data in a second target object, wherein the read request contains an identifier of the target data; inquiring whether an identifier exists in a preset service configuration list; if the identifier exists in the service configuration list, acquiring a request parameter corresponding to the read request; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading target data from the preset cache, and sending the target data to a first target object; if the hash result does not exist in the preset cache, reading target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
The processor may call the information and the application program stored in the memory through the transmission device to perform the following steps: acquiring request parameters, wherein the request parameters are parameters corresponding to a write request initiated by a first target object, the write request is used for writing target data into a second target object, and the write request contains the target data; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, writing target data in the preset cache; and writing the data in the preset cache into the second target object at regular time.
It will be appreciated by those skilled in the art that the configuration shown in fig. 12 is merely illustrative, and the computer terminal may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm-phone computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 12 is not limited to the structure of the electronic device. For example, the computer terminal a may also include more or fewer components (such as a network interface, a display device, etc.) than shown in fig. 12, or have a different configuration than shown in fig. 12.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
Example 11
Embodiments of the present application also provide a storage medium. Alternatively, in this embodiment, the storage medium described above may be used to store program codes executed by the data processing method provided in embodiment 1 described above.
Alternatively, in this embodiment, the storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether the hash result exists in a preset cache; and if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: acquiring a data request initiated by a first target object for accessing a second target object, wherein the data request comprises an identifier of target data; inquiring whether the identifier exists in a preset service configuration list; and processing the target data in a preset cache under the condition that the identifier exists in the service configuration list.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: acquiring a read request initiated by a first target object for reading target data in a second target object, wherein the read request contains an identifier of the target data; inquiring whether an identifier exists in a preset service configuration list; if the identifier exists in the service configuration list, acquiring a request parameter corresponding to the read request; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, reading target data from the preset cache, and sending the target data to a first target object; if the hash result does not exist in the preset cache, reading target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: acquiring request parameters, wherein the request parameters are parameters corresponding to a write request initiated by a first target object, the write request is used for writing target data into a second target object, and the write request contains the target data; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether a hash result exists in a preset cache; if the hash result exists in the preset cache, writing target data in the preset cache; and writing the data in the preset cache into the second target object at regular time.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (16)

1. A data processing method, comprising:
acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object;
carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters;
judging whether the hash result exists in a preset cache;
if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache;
wherein the data request comprises: a read request, wherein the read request is used for reading the target data in the second target object, and the read request contains an identifier of the target data;
in the case where the data request is the read request, before acquiring the request parameter, the method further includes: acquiring the read request; inquiring whether the identification of the target data exists or not from a preset service configuration list; and if the identifier exists in the service configuration list, executing the acquisition request parameter.
2. The method of claim 1, wherein the data request comprises: a write request; wherein the write request is used for writing the target data into the second target object, and the write request contains the target data.
3. The method of claim 1, wherein the method further comprises:
and if the identifier does not exist in the service configuration list, reading the target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
4. The method of claim 1, wherein the reading or writing the target data indicated by the data request in the preset cache comprises:
and reading the target data from the preset cache and sending the target data to the first target object.
5. The method of claim 1, wherein the method further comprises:
and if the hash result does not exist in the preset cache, reading the target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
6. The method of claim 2, wherein, in a case where the data request is a write request, the reading or writing the target data indicated by the data request in the preset cache includes:
and writing the target data in the write request into the preset cache, wherein the target data corresponds to the hash result.
7. The method of claim 6, wherein after writing target data in the write request into the preset cache, the method further comprises:
and writing the data in the preset cache into the second target object at fixed time.
8. The method of claim 6, wherein the method further comprises:
and if the hash result does not exist in the preset cache, writing the target data in the write request into the second target object.
9. A data processing method, comprising:
acquiring a data request initiated by a first target object for accessing a second target object, wherein the data request comprises an identifier of target data;
inquiring whether the identifier exists in a preset service configuration list;
processing the target data in a preset cache under the condition that the identifier exists in the service configuration list;
Wherein the data request comprises: a read request, wherein the read request is used for reading the target data in the second target object, and the read request contains the identification of the target data;
in the case where the data request is the read request, in the case where the identity is present in the service configuration list, the method further comprises: acquiring request parameters corresponding to the read request; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether the hash result exists in the preset cache; if the hash result exists in the preset cache, reading the target data from the preset cache, and sending the target data to the first target object; and if the hash result does not exist in the preset cache, reading the target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
10. The method of claim 9, wherein the data request comprises: cleaning a data request; the cleaning data request is used for indicating to clean the target data in the preset cache, and the cleaning data request contains the identification of the target data.
11. The method of claim 9, wherein the method further comprises:
and under the condition that the identification does not exist in the service configuration list, reading the target data from the second target object, writing the target data into the preset cache and sending the target data to the first target object.
12. The method of claim 10, wherein, in the case where the data request is the clean data request, the processing the target data in a preset cache comprises:
and cleaning the target data corresponding to the identification from the preset cache.
13. A storage medium comprising a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the data processing method of any one of claims 1 to 12.
14. A processor for running a program, wherein the program when run performs the data processing method of any one of claims 1 to 12.
15. A data processing system, comprising:
a processor; and
a memory, coupled to the processor, for providing instructions to the processor to process the following processing steps: acquiring request parameters, wherein the request parameters are parameters corresponding to a data request initiated by a first target object, and the data request is used for accessing a second target object; carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters; judging whether the hash result exists in a preset cache; if the hash result exists in the preset cache, reading or writing target data indicated by the data request in the preset cache;
Wherein the data request comprises: a read request, wherein the read request is used for reading the target data in the second target object, and the read request contains an identifier of the target data;
the memory is further configured to provide instructions for the processor to process the following processing steps: acquiring the read request; inquiring whether the identification of the target data exists or not from a preset service configuration list; and if the identifier exists in the service configuration list, executing the acquisition request parameter.
16. A data processing method, comprising:
acquiring a read request initiated by a first target object for reading target data in a second target object, wherein the read request contains an identifier of the target data;
inquiring whether the identifier exists in a preset service configuration list;
if the identifier exists in the service configuration list, acquiring a request parameter corresponding to the read request;
carrying out hash processing on the request parameters to obtain hash results corresponding to the request parameters;
judging whether the hash result exists in a preset cache;
if the hash result exists in the preset cache, reading the target data from the preset cache, and sending the target data to the first target object;
And if the hash result does not exist in the preset cache, reading the target data from the second target object, writing the target data into the preset cache, and sending the target data to the first target object.
CN201810972376.7A 2018-08-24 2018-08-24 Data processing method and system, processor and storage medium Active CN110858201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810972376.7A CN110858201B (en) 2018-08-24 2018-08-24 Data processing method and system, processor and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810972376.7A CN110858201B (en) 2018-08-24 2018-08-24 Data processing method and system, processor and storage medium

Publications (2)

Publication Number Publication Date
CN110858201A CN110858201A (en) 2020-03-03
CN110858201B true CN110858201B (en) 2023-05-02

Family

ID=69635446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810972376.7A Active CN110858201B (en) 2018-08-24 2018-08-24 Data processing method and system, processor and storage medium

Country Status (1)

Country Link
CN (1) CN110858201B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672524A (en) * 2021-08-20 2021-11-19 上海哔哩哔哩科技有限公司 Data processing method and system based on multi-level cache

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158965A (en) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 File reading system and method of distributed file systems
JP2009110407A (en) * 2007-10-31 2009-05-21 Toshiba Corp Cache method and cache device
CN104809179A (en) * 2015-04-16 2015-07-29 华为技术有限公司 Device and method for accessing Hash table
CN105159604A (en) * 2015-08-20 2015-12-16 浪潮(北京)电子信息产业有限公司 Disk data read-write method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158965A (en) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 File reading system and method of distributed file systems
JP2009110407A (en) * 2007-10-31 2009-05-21 Toshiba Corp Cache method and cache device
CN104809179A (en) * 2015-04-16 2015-07-29 华为技术有限公司 Device and method for accessing Hash table
CN105159604A (en) * 2015-08-20 2015-12-16 浪潮(北京)电子信息产业有限公司 Disk data read-write method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李文中 ; 周俊 ; 顾铁成 ; 李春洪 ; 陆桑璐 ; 陈道蓄 ; .基于Globus的流媒体网格信息服务系统.小型微型计算机系统.2005,第26卷(第12期),第2074-2077页. *

Also Published As

Publication number Publication date
CN110858201A (en) 2020-03-03

Similar Documents

Publication Publication Date Title
CN108062367B (en) Data list uploading method and terminal thereof
CN113568884B (en) File management method and device, electronic equipment and storage medium
CN109218133B (en) Network speed testing system, method, device and computer readable storage medium
US11122128B2 (en) Method and device for customer resource acquisition, terminal device and storage medium
CN108287751B (en) Task execution method and device and distributed system
CN107169094B (en) Information aggregation method and device
CN109246078B (en) Data interaction method and server
CN110825772A (en) Method and device for synchronizing memory data of multiple service instances and storage medium
CN111694703B (en) Cache region management method and device and computer equipment
CN110858201B (en) Data processing method and system, processor and storage medium
CN110704198B (en) Data operation method, device, storage medium and processor
US20160156722A1 (en) Resource migration method and apparatus
CN109842482B (en) Information synchronization method, system and terminal equipment
CN108647139B (en) System test method, device, storage medium and electronic device
CN111913396A (en) Offline cooking control method, device and equipment
CN109639629B (en) Data access processing method and device, computer equipment and storage medium
CN110659299B (en) Data updating method and device and front-end development client
CN111008220A (en) Dynamic identification method and device of data source, storage medium and electronic device
CN110609701A (en) Method, apparatus and storage medium for providing service
CN113590913B (en) Data resource display method and device, storage medium and electronic device
CN116185782B (en) Service monitoring method and device for social software
CN110096255B (en) Rule degradation processing method, device and system and data processing method
CN110688231B (en) Method, device and system for processing read-write request statistical information
CN110874352B (en) Database management method and system
CN117061129A (en) Account processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024921

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant