[go: up one dir, main page]

CN109947795A - The acquisition methods and device of target data - Google Patents

The acquisition methods and device of target data Download PDF

Info

Publication number
CN109947795A
CN109947795A CN201710943640.XA CN201710943640A CN109947795A CN 109947795 A CN109947795 A CN 109947795A CN 201710943640 A CN201710943640 A CN 201710943640A CN 109947795 A CN109947795 A CN 109947795A
Authority
CN
China
Prior art keywords
data
network interface
interface card
target data
local cache
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
CN201710943640.XA
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.)
Alibaba Cloud Computing 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 CN201710943640.XA priority Critical patent/CN109947795A/en
Priority to PCT/CN2018/108306 priority patent/WO2019072103A1/en
Publication of CN109947795A publication Critical patent/CN109947795A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of acquisition methods of target data and devices.Wherein, which includes: network interface card, and one or more processing chips are configured on network interface card;Network interface card, for receiving the first request message from transmitting terminal, wherein for obtaining target data, target data is stored in default storage region and is accessed by processor to default storage region the first request message;Network interface card determines the feedback system of target data for the judging result according to the Backup Data for whether being stored with target data in network interface card local cache.The technical issues of present invention solves the prior art and all relies on CPU due to obtaining the operation of data, leads to CPU over-burden.

Description

The acquisition methods and device of target data
Technical field
The present invention relates to data processing fields, in particular to the acquisition methods and device of a kind of target data.
Background technique
Database (Database) is the warehouse for coming tissue, storage and management data according to data structure.One IT system In key data all deposit in the database, by taking shopping website as an example, the Bidder Information of shopping website, vendor information, commodity letter The data such as breath and bill information are stored in the database of Website server.The inquiry operation of database very frequency in system It is numerous, for example, background server needs to inquire the commodity being located in database when clicking the information of some commodity on shopping website Then information is presented to headend equipment.
Specifically, the request of access database is usually obtained from network.Fig. 1 is a kind of inquiry number according to prior art According to schematic diagram, the query process are as follows:
S11, request end issue inquiry request, and the server network interface card where database receives network message.
S12, network interface card give network message to CPU.
Protocol type, content in S13, CPU parsing network message, and judge whether it is data base querying request.
S14, if so, reading the data to be inquired from memory.
S15, CPU encapsulate data into network message.
Network message is back to network interface card by S16.
S17, network interface card issue network message.
From the foregoing, it will be observed that in the prior art scheme, no matter which kind of acceleration technique used, CPU requires to execute following work: (1) parsing of network message.Whether be sql request, if so, the sql is requested if needing CPU judge to carry in network message Which data needed to inquire.(2) data are read.Even if data are buffered, the operation for reading data is also completed by CPU.(3) by result It is encapsulated in network message.After inquiring result, result is encapsulated in network message by CPU according to protocol format, and is issued Network interface card.Therefore, the process almost all of data query relies on CPU to complete.
For the problem that the prior art all relies on CPU due to obtaining the operation of data, leading to CPU, over-burden, at present Not yet put forward effective solutions.
Summary of the invention
The embodiment of the invention provides a kind of acquisition methods of target data and device, at least solve the prior art due to The technical issues of operation for obtaining data all relies on CPU, leads to CPU over-burden.
According to an aspect of an embodiment of the present invention, a kind of acquisition device of target data is provided, comprising: network interface card, institute It states on network interface card configured with one or more processing chips;The network interface card, for receiving the first request message from transmitting terminal, Wherein, for obtaining target data, target data is stored in default storage region and passes through processor first request message It accesses to default storage region;The network interface card, for according to whether being stored with the target data in network interface card local cache Backup Data judging result, determine the feedback system of the target data.
According to another aspect of an embodiment of the present invention, a kind of acquisition methods of target data are additionally provided, comprising: receive and From in the first request message of transmitting terminal, wherein for obtaining target data, target data is stored in first request message Default storage region simultaneously accesses to the default storage region by processor;Whether stored according in network interface card local cache There is the judging result of the Backup Data of the target data, determines the feedback system of the target data.
In the prior art, during obtaining target data, network interface card sends out request message for forwarding request message It send to CPU, request message is parsed by CPU, determine whether the request message is used for request data, and request to disappear determining Breath is used to initiate to request to database in the case where request data, and in embodiments of the present invention, by being executed in network interface card in above-mentioned Hold, to reduce the operation burden of CPU, further, the network interface card in the above embodiments of the present application also has processing chip, place Reason chip has cached the data of partial database, it can be determined that whether the caching in network interface card includes the requested number of targets of transmitting terminal According to Backup Data, and the feedback system of target data is determined according to judging result, to improve to request end feedback coefficient According to speed.
Above scheme provided by the present application solves the prior art and all relies on CPU due to obtaining the operation of data as a result, The technical issues of leading to CPU over-burden.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 be according to prior art it is a kind of inquire data schematic diagram;
Fig. 2 is the schematic diagram according to a kind of acquisition device of acquisition target data of the embodiment of the present application;
Fig. 3 is the schematic diagram according to a kind of FPGA intelligent network adapter of the embodiment of the present application;
Fig. 4 is the schematic diagram according to the optional system for obtaining data of one kind of the embodiment of the present application;
Fig. 5 shows a kind of hardware of the terminal (or mobile device) of acquisition methods for realizing target data Structural block diagram;
Fig. 6 is the flow chart according to a kind of acquisition methods of target data of the embodiment of the present application;
Fig. 7 is the processing method that the network packet that transmitting terminal issues is received according to a kind of network interface card of the embodiment of the present application Flow chart;
Fig. 8 is the process that the processing method for the data packet that processor issues is received according to a kind of network interface card of the embodiment of the present application Figure;
Fig. 9 is the schematic diagram according to a kind of system of the embodiment of the present application;And
Figure 10 is a kind of structural block diagram of terminal according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
Firstly, the part noun or term that occur during the embodiment of the present application is described are suitable for following solution It releases:
FPGA:Field-Programmable Gate Array, field programmable gate array, based on concurrent operation, with Hardware description language is come the Digital Logical Circuits integrated chip realized.
Embodiment 1
In the prior art when obtaining the data in database, need by server come according to the information in request to number According to library request data, and after the data that request is obtained are packaged, request transmitting terminal is returned to by network interface card namely this is obtained The process of access evidence relies primarily on processor to realize, causes processor pressure excessive, in operation burden, when request of data is excessive When, the speed of service of processor can be reduced.
Over-burden for processor when in order to solve the problems, such as to obtain data from database, and this application provides a kind of acquisition mesh The acquisition device of data is marked, specifically as shown in Fig. 2, the device includes: network interface card 20, one or more processing cores are configured on network interface card Piece 22;
Network interface card, for receiving the first request message from transmitting terminal, wherein the first request message is for obtaining target Data, target data are stored in default storage region and are accessed by processor to default storage region;
Network interface card, for the judging result according to the Backup Data for whether being stored with target data in network interface card local cache, really The feedback system for the data that set the goal.
Specifically, above-mentioned processing chip can be fpga chip, transmitting terminal can be the terminal of request target data.One In kind optional embodiment, user clicks commodity details on shopping website, i.e. user passes through network interface card of the terminal to shopping website The first request message is had sent, which is the details letter for the commodity that user clicks Breath, such as: the amount of money, size, material, comment information of commodity etc., and the database in shopping website for storing data can be with It is default storage region.
Above-mentioned local cache can be the buffer area that the one or more processing chips configured on network interface card are constituted on network interface card Domain.The feedback system of target data can be from network interface card and directly return to transmitting terminal, or be continued after database request from network interface card, It is returned again to transmitting terminal.In an alternative embodiment, if being stored with the Backup Data of target data in local cache, Network interface card takes out the Backup Data in caching, is directly returned to receiving end;If not stored Backup Data, net in local cache Card continues the first request message to be sent to database, to database request target data.
Fig. 3 is collected in network interface card as shown in connection with fig. 3 according to a kind of schematic diagram of FPGA intelligent network adapter of the embodiment of the present application At there is fpga chip, there is the data channel for being used for transmission data in fpga chip and network card chip, fpga chip can pass through Ethernet interface is communicated with transmitting terminal, and network card chip can be logical by PCI-E interface (PCI Express interface) and processor Letter.Due to joined processing chip in the data path of network interface card, can be determined by being programmed to processing chip How data packet is handled, and in the embodiment of the present application, whether stored by processing chip according in the ground of network interface card caching There is target data to determine the feedback system of target data.
Herein it should be noted that in the prior art, during obtaining target data, network interface card is for forwarding request Request message is sent to CPU by message, is parsed by CPU to request message, is determined whether the request message is used for number of request According to, and initiate to request to database in the case where determining request message for request data, and scheme provided by the present application exists Above content is executed in network interface card, to reduce the operation burden of CPU, further, the network interface card in the above embodiments of the present application Also there is processing chip, processing chip has cached the data of partial database, it can be determined that whether the caching in network interface card includes hair The Backup Data of the requested target data of sending end, and determine according to judging result the feedback system of target data, to mention The high speed to request end feedback data.
Above scheme provided by the present application solves the prior art and all relies on CPU due to obtaining the operation of data as a result, The technical issues of leading to CPU over-burden.
As a kind of optional embodiment, above-mentioned network interface card, which is also used to determine in network interface card local cache, is stored with Backup Data, And Backup Data is back to transmitting terminal.
In an alternative embodiment, it when network interface card receives the data packet of transmitting terminal transmission, is parsed by processing chip Data packet judges whether data packet is database request, i.e., first message is requested, if data packet is database request, sentences It whether include that first message requests the corresponding Backup Data of requested target data in suspension card local cache, in the sheet of network interface card In the case of ground caching requests the Backup Data of requested target data including first message, by the target data in local cache Backup Data be back to transmitting terminal, complete to the response in first message request.
In the above-described embodiments, if target data is in the local data base of network interface card, this request does not need to hand over To CPU, but directly Backup Data is encapsulated by intelligent network adapter, and return to network message, does not need to be given processor, Data processing link is simplified, delay is reduced, improves the performance of database.
As a kind of optional embodiment, above-mentioned network interface card is also used to determine in network interface card local cache not stored there is backup number According to, by the way that the first request message is forwarded to processor, to processor obtain it is corresponding with the first request message first respond disappear Breath, wherein processor is coupled with network interface card, and the number of targets got from default storage region is carried in the first response message According to;
Network interface card is also used to target data being back to transmitting terminal.
Specifically, above-mentioned processor can be CPU.Fig. 4 is the optional acquisition data of one kind according to the embodiment of the present application System schematic diagram, in this example network interface card be FPGA intelligent network adapter for, in an alternative embodiment, when network interface card connects When receiving the data packet of transmitting terminal transmission, data packet is parsed by processing chip, judges whether data packet is database request, i.e., the Whether one message request judges in local cache to include that first message requests institute if whether data packet is database request The target data of request, in the case where the local cache of network interface card does not include that first message requests requested target data, net First request message is sent to processor by card, from processor to database request target data, and after target data is encapsulated Transmitting terminal is back to by the first response message.
In the feedback system of the first above-mentioned target data, due to including the first request message in the local cache of network interface card The Backup Data of middle target data, processor are not necessarily to execute any operation in this course, in above-mentioned second of target data Feedback system in, due to do not include in the local cache of network interface card first message request in target data Backup Data, need First message request is forwarded to processor, from processor to database request target data, therefore only in this course Processor is needed to execute corresponding operation.It follows that processor does not need to make all requests for obtaining target data Response, to achieve the purpose that mitigate processor burden.
As a kind of optional embodiment, above-mentioned network interface card is also used to determine that the residual memory space in network interface card local cache is big The memory space of the occupancy needed for target data, and target data is backed up into local cache.
In an alternative embodiment, if network interface card receives the network message of processor sending, the processing core in network interface card Piece parses network message, judges whether it is response for some the first request message, if it is, illustrating the net It include the requested target data of the first request message in network message, at this point, processing chip judges that network interface card remains local cache Whether remaining memory space allows to deposit the Backup Data of target data, if it is allowed, this target data is then backed up to local cache. If it is not allowed, the network message that processor issues then directly to be dealt into the Ethernet interface of network interface card.
As a kind of optional embodiment, when above-mentioned network interface card is also used to determine the storage when Backup Data in local cache When length is more than the first preset threshold, Backup Data is not visited always, then removes Backup Data.
In an alternative embodiment, processing chip is started counting when often receiving a target data, if standby Part data are not accessed again yet when timing is more than lower than preset threshold, in the local cache for being cleared out of network interface card.
Above scheme is all backed up after network interface card receives target data, if it exceeds the first preset threshold when Between after still without accessed, then confirm that the accessed frequency of this target data is lower, its Backup Data can be removed.It is right Each target data carries out such processing, so that is saved in the local cache of network interface card is all access frequency The Backup Data of secondary higher target data, and then the further access reduced to processor is herein, reduces the pressure of processor Power.
As a kind of optional embodiment, above-mentioned network interface card is also used to count the visitation frequency of target data, and is accessing When the frequency is greater than the second preset threshold, target data is backed up in local cache.
Above scheme determines whether to store target data to local cache according to the visitation frequency of target data, due to The storage region of the local cache of network interface card is limited, therefore can count the accessed frequency of target data, and target data is accessed The frequency be more than the second preset value when, backed up in the local cache of network interface card.
As a kind of optional embodiment, above-mentioned network interface card is also used to receive the second request message from transmitting terminal, In, data are written to default storage region for requesting in the second request message;And it if it is determined that is stored in network interface card local cache There is data backup corresponding with data to be written, then clear data backup, and forwards the second request message to processor.
In an alternative embodiment, network interface card receives the network message including write operation, and instruction will more in write operation Database is written in new commodity amount parameter number=10, judges whether the local cache of network interface card is stored with the backup of the data Data, if there being the Backup Data of commodity amount parameter number, due to there is new commodity amount parameter number write-in, Confirm that the Backup Data of commodity amount parameter number stored in the local cache of network interface card is invalid, be deleted, and by quotient Product number parameter number is transmitted to processor, database is written.
Embodiment 2
According to embodiments of the present invention, a kind of embodiment of the acquisition methods of target data is additionally provided, it should be noted that Step shown in the flowchart of the accompanying drawings can execute in a computer system such as a set of computer executable instructions, and It, in some cases, can be to be different from sequence execution institute herein and although logical order is shown in flow charts The step of showing or describing.
Embodiment of the method provided by the embodiment of the present application one can be in mobile terminal, terminal or similar fortune It calculates and is executed in device.Fig. 5 shows a kind of terminal (or mobile device) of acquisition methods for realizing target data Hardware block diagram.As shown in figure 5, terminal 50 (or mobile device 50) may include one or more (adopts in figure With 502a, 502b ... ..., 502n is shown) processor 502 (processor 502 can include but is not limited to Micro-processor MCV or The processing unit of programmable logic device FPGA etc.), memory 504 for storing data and the biography for communication function Defeated module 506.It in addition to this, can also include: display, input/output interface (I/O interface), universal serial bus (USB) Port (a port that can be used as in the port of I/O interface is included), network interface, power supply and/or camera.This field is general Logical technical staff is appreciated that structure shown in fig. 5 is only to illustrate, and does not cause to limit to the structure of above-mentioned electronic device. For example, terminal 50 may also include the more perhaps less component than shown in Fig. 5 or have different from shown in Fig. 5 Configuration.
It is to be noted that said one or multiple processors 502 and/or other data processing circuits lead to herein Can often " data processing circuit " be referred to as.The data processing circuit all or part of can be presented as software, hardware, firmware Or any other combination.In addition, data processing circuit for single independent processing module or all or part of can be integrated to meter In any one in other elements in calculation machine terminal 50 (or mobile device).As involved in the embodiment of the present application, The data processing circuit controls (such as the selection for the variable resistance end path connecting with interface) as a kind of processor.
Memory 504 can be used for storing the software program and module of application software, such as the target in the embodiment of the present invention Corresponding program instruction/the data storage device of the acquisition methods of data, processor 502 are stored in memory 504 by operation Software program and module realize obtaining for above-mentioned target data thereby executing various function application and data processing Take method.Memory 504 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic Property storage device, flash memory or other non-volatile solid state memories.In some instances, memory 504 can further comprise The memory remotely located relative to processor 502, these remote memories can pass through network connection to terminal 50. The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Transmitting device 506 is used to that data to be received or sent via a network.Above-mentioned network specific example may include The wireless network that the communication providers of terminal 50 provide.In an example, transmitting device 506 includes that a network is suitable Orchestration (Network Interface Controller, NIC), can be connected by base station with other network equipments so as to Internet is communicated.In an example, transmitting device 506 can be radio frequency (Radio Frequency, RF) module, For wirelessly being communicated with internet.
Display can such as touch-screen type liquid crystal display (LCD), the liquid crystal display aloow user with The user interface of terminal 50 (or mobile device) interacts.
Herein it should be noted that in some optional embodiments, above-mentioned computer equipment shown in fig. 5 (or movement is set It is standby) it may include hardware element (including circuit), software element (including the computer generation that may be stored on the computer-readable medium Code) or both hardware element and software element combination.It should be pointed out that Fig. 5 is only a reality of particular embodiment Example, and it is intended to show that the type for the component that may be present in above-mentioned computer equipment (or mobile device).
Under above-mentioned running environment, this application provides the acquisition methods of target data as shown in FIG. 6.Fig. 6 is basis A kind of flow chart of the acquisition methods of the target data of the embodiment of the present application.
Step S61 receives the first request message from transmitting terminal, wherein the first request message is for obtaining target Data, target data are stored in default storage region and are accessed by processor to default storage region.
Specifically, the first request message from transmitting terminal can be received by network interface card.
Step S63 is determined according to the judging result for the Backup Data for whether being stored with target data in network interface card local cache The feedback system of target data.
Above-mentioned local cache can be the buffer area that the one or more processing chips configured on network interface card are constituted on network interface card Domain.The feedback system of target data can be from network interface card and directly return to transmitting terminal, or be continued after database request from network interface card, It is returned again to transmitting terminal.In an alternative embodiment, if being stored with the Backup Data of target data in local cache, Network interface card takes out the Backup Data in caching, is directly returned to receiving end;If not stored target data is standby in local cache Part data, then network interface card continues the first request message to be sent to database, to database request target data.
As a kind of optional embodiment, according to the judging result for whether being stored with target data in network interface card local cache, It determines that the feedback system of Backup Data comprises determining that in network interface card local cache and is stored with Backup Data;Backup Data is back to Transmitting terminal.
As a kind of optional embodiment, according to the judging result for whether being stored with target data in network interface card local cache, Determine the feedback system of target data further include: determining not stored in network interface card local cache has Backup Data;By being asked to first It asks message to be forwarded, obtains the first response message corresponding with the first request message to processor, wherein the first response message In carry the target data got from default storage region;Target data is back to transmitting terminal.
As a kind of optional embodiment, before target data is back to transmitting terminal, determine in network interface card local cache Residual memory space be greater than target data needed for occupy memory space;Target data is backed up into local cache.
As a kind of optional embodiment, after target data is backed up to local cache, record Backup Data is at this Storage duration in ground caching;When storing duration more than the first preset threshold, determine that Backup Data is not visited always;It removes Backup Data.
As a kind of optional embodiment, according to the judgement knot for whether being stored with Backup Data in network interface card local cache Fruit before the feedback system for determining target data, counts the visitation frequency of target data;It is greater than the first default threshold in visitation frequency When value, target data is backed up in local cache.
As a kind of optional embodiment, according to the judgement knot for whether being stored with Backup Data in network interface card local cache Fruit, after the feedback system for determining target data, further includes: receive the second request message from transmitting terminal, wherein second Data are written to default storage region for requesting in request message;It determines and is stored in network interface card local cache and data pair to be written The data backup answered;Clear data backup, and forwards the second request message to processor.
As a kind of optional embodiment, the above method is suitable for network interface card.
Fig. 7 is the processing method that the network packet that transmitting terminal issues is received according to a kind of network interface card of the embodiment of the present application Flow chart is described the acquisition methods of the target data in application embodiment below with reference to shown in Fig. 7.
S71 receives network packet.Specifically, above-mentioned network packet is generated by transmitting terminal.
S72, if for the data packet for reading data.In the case where network packet is to read the data packet of data, into step Rapid S73, otherwise enters step S75.
S73, in local cache whether include target data Backup Data.It is standby comprising target data in local cache In the case where part data, S74 is entered step, S78 is otherwise entered step.
S74 reads the Backup Data in local cache, and returns after being packaged to Backup Data.
It, can be by the processing in network interface card in the case where being stored with the Backup Data of target data in the local cache of network interface card Chip is back to transmitting terminal after being packaged to Backup Data.
S75, if be the data packet for writing data, in the case where network packet is the data packet for writing data, into step Rapid S76, otherwise enters step S78.
Whether S76, network interface card local cache are stored with the Backup Data of data to be written.If be stored in local cache to The Backup Data that data are written, then enter step S77, otherwise enter step S78.
S77 removes the corresponding Backup Data of data to be written from local cache.
In the case where being stored with the corresponding Backup Data of data to be written in the local cache of network interface card, it can be confirmed current The corresponding Backup Data of data to be written stored in local cache is fail data, thus by its from local cache it is clear It removes.
S78 forwards the packet to processor.
In the local cache of network interface card in the case where the not stored Backup Data for having target data, network interface card is by network packet It is sent to processor, from processor to database request target data, and is sealed the data that database returns by processor Dress, is back to transmitting terminal using network interface card.
Neither it is the data packet for reading data in network packet, is not also the case where writing the data packet of data, network interface card is by net Network data include being sent to processor, carry out respective handling by processor.
It is not stored in the case where have data to be written corresponding Backup Data in the local cache of network interface card, it is written into number According to server is sent to, data backup is written into database by server.
Fig. 8 is the process that the processing method for the data packet that processor issues is received according to a kind of network interface card of the embodiment of the present application Figure is described the acquisition methods of the target data in application embodiment below with reference to shown in Fig. 8.
S81 receives the data packet of processor transmission.Specifically, above-mentioned processor can be CPU.
S82, if for the returned data of read from database operation.If data packet is the returned data of read from database operation, S83 is then entered step, S85 is otherwise entered step.
S83, whether there are also enough memory spaces in local cache.If also having enough storages empty in local cache Between, then S84 is entered step, S85 is otherwise entered step.
S84, by the data backup in data packet to local cache.By the data backup in data packet to local cache it Afterwards, when network interface card receives the reading data command of the data again, then without by server to database request, but directly from It is taken out in local cache and is sent to transmitting terminal.
S85 sends data packets to network interface.
In the case where not having enough memory spaces in local cache, network interface is directly sent data packets to.
In the case where data packet is not to read the returned data of data manipulation, network interface is directly sent data packets to.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Embodiment 3
According to embodiments of the present invention, a kind of system is additionally provided, as shown in figure 9, the system includes:
Processor 90;And
Memory 92, connect with processor, for providing the instruction for executing following treatment process for processor:
Receive the first request message from transmitting terminal, wherein the first request message is for obtaining target data, target Data are stored in default storage region and are accessed by processor to default storage region;
According to the judging result for the Backup Data for whether being stored with target data in network interface card local cache, target data is determined Feedback system.
Specifically, above-mentioned processor can also be performed such as other steps in embodiment 1, details are not described herein again.
Embodiment 4
The embodiment of the present invention can provide a kind of terminal, which can be in terminal group Any one computer terminal.Optionally, in the present embodiment, above-mentioned terminal also could alternatively be mobile whole The terminal devices such as end.
Optionally, in the present embodiment, above-mentioned terminal can be located in multiple network equipments of computer network At least one network equipment.
In the present embodiment, above-mentioned terminal can be with the program of following steps in the acquisition methods of performance objective data Code: the first request message from transmitting terminal is received, wherein the first request message is for obtaining target data, number of targets According to being stored in default storage region and accessed by processor to default storage region;According in network interface card local cache whether It is stored with the judging result of the Backup Data of target data, determines the feedback system of target data.
Optionally, Figure 10 is a kind of structural block diagram of terminal according to an embodiment of the present invention.As shown in Figure 10, should Terminal A may include: one or more (one is only shown in figure) processors 1002, memory 1004 and peripheral hardware Interface 1006.
Wherein, memory can be used for storing software program and module, such as obtaining for the target data in the embodiment of the present invention Corresponding program instruction/the module of method and apparatus is taken, processor is by running the software program being stored in memory and mould Block realizes the acquisition methods of above-mentioned target data thereby executing various function application and data processing.Memory can wrap Include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage device, flash memory or Other non-volatile solid state memories of person.In some instances, memory can further comprise remotely located relative to processor Memory, these remote memories can pass through network connection to terminal A.The example of above-mentioned network includes but is not limited to interconnect Net, intranet, local area network, mobile radio communication and combinations thereof.
Processor can call the information and application program of memory storage by transmitting device, to execute following step: Receive the first request message from transmitting terminal, wherein the first request message is for obtaining target data, target data storage It accesses in default storage region and by processor to default storage region;Whether it is stored with according in network interface card local cache The judging result of the Backup Data of target data determines the feedback system of target data.
Optionally, the program code of following steps can also be performed in above-mentioned processor: determining and stores in network interface card local cache There is Backup Data;Backup Data is back to transmitting terminal.
Optionally, the program code of following steps can also be performed in above-mentioned processor: determining and does not deposit in network interface card local cache Contain mesh Backup Data;By being forwarded to the first request message, corresponding with the first request message the is obtained to processor One response message, wherein the target data got from default storage region is carried in the first response message;By target data It is back to transmitting terminal.
Optionally, the program code of following steps can also be performed in above-mentioned processor: determining surplus in network interface card local cache Remaining memory space is greater than the memory space occupied needed for target data;Target data is backed up into local cache.
Optionally, the program code of following steps can also be performed in above-mentioned processor: record Backup Data is in local cache In storage duration;When storing duration more than the first preset threshold, determine that Backup Data is not visited always;Remove backup number According to.
Optionally, the program code of following steps can also be performed in above-mentioned processor: counting the visitation frequency of target data; When visitation frequency is greater than the first preset threshold, target data is backed up in local cache.
Optionally, the program code of following steps can also be performed in above-mentioned processor: receiving from the second of transmitting terminal Request message, wherein data are written to default storage region for requesting in the second request message;It determines and is deposited in network interface card local cache Contain data backup corresponding with data to be written;Clear data backup, and forwards the second request message to processor.
The above method is suitable for network interface card.
Herein it should be noted that in the prior art, during obtaining target data, network interface card is for forwarding request Request message is sent to CPU by message, is parsed by CPU to request message, is determined whether the request message is used for number of request According to, and initiate to request to database in the case where determining request message for request data, and scheme provided by the present application exists Above content is executed in network interface card, to reduce the operation burden of CPU, further, the network interface card in the above embodiments of the present application Also there is processing chip, processing chip has cached the data of partial database, it can be determined that whether the caching in network interface card includes hair The Backup Data of the requested target data of sending end, and determine according to judging result the feedback system of target data, to mention The high speed to request end feedback data.
Above scheme provided by the present application solves the prior art and all relies on CPU due to obtaining the operation of data as a result, The technical issues of leading to CPU over-burden.
It will appreciated by the skilled person that structure shown in Fig. 10 is only to illustrate, terminal is also possible to Smart phone (such as Android phone, iOS mobile phone), tablet computer, applause computer and mobile internet device (Mobile Internet Devices, MID), the terminal devices such as PAD.Figure 10 it does not cause to limit to the structure of above-mentioned electronic device.Example Such as, terminal 10 may also include the more or less component (such as network interface, display device) than shown in Figure 10, Or with the configuration different from shown in Figure 10.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing the relevant hardware of terminal device by program, which can store in a computer readable storage medium In, storage medium may include: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..
Embodiment 5
The embodiments of the present invention also provide a kind of storage mediums.Optionally, in the present embodiment, above-mentioned storage medium can With program code performed by the acquisition methods for saving target data provided by above-described embodiment one.
Optionally, in the present embodiment, above-mentioned storage medium can be located in computer network in computer terminal group In any one terminal, or in any one mobile terminal in mobile terminal group.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: connecing Receive the first request message from transmitting terminal, wherein the first request message is for obtaining target data;According in local cache It whether is stored with the judging result of target data, determines the feedback system of target data.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (18)

1. a kind of acquisition device of target data characterized by comprising network interface card, configured with one or more on the network interface card Handle chip;
The network interface card, for receiving the first request message from transmitting terminal, wherein first request message is for obtaining Target data, the target data are stored in default storage region and are visited by processor the default storage region It asks;
The network interface card, for the judgement knot according to the Backup Data for whether being stored with the target data in network interface card local cache Fruit determines the feedback system of the target data.
2. the apparatus according to claim 1, which is characterized in that the network interface card is also used to determine the network interface card local cache In be stored with the Backup Data, and the Backup Data is back to the transmitting terminal.
3. the apparatus according to claim 1, which is characterized in that the network interface card is also used to determine the network interface card local cache In it is not stored have the Backup Data, by the way that first request message is forwarded to processor, Xiang Suoshu processor obtain with Corresponding first response message of first request message, wherein the processor is coupled with the network interface card, first sound Answer the target data for carrying in message and getting from default storage region;
The network interface card is also used to the target data being back to the transmitting terminal.
4. device according to claim 3, which is characterized in that the network interface card is also used to determine the network interface card local cache In residual memory space be greater than the memory space occupied needed for the target data, and the target data is backed up into institute State local cache.
5. device according to claim 4, which is characterized in that the network interface card is also used to determine when the Backup Data exists When storage duration in the local cache is more than the first preset threshold, the Backup Data is not visited always, then removes institute State Backup Data.
6. the apparatus according to claim 1, which is characterized in that the network interface card is also used to count the visit of the target data It asks the frequency, and when the visitation frequency is greater than the second preset threshold, the target data is backed up into the local cache In.
7. the apparatus according to claim 1, which is characterized in that the network interface card is also used to receive from the transmitting terminal The second request message, wherein data are written to the default storage region for requesting in second request message;And such as Fruit, which determines, is stored with data backup corresponding with data to be written in the network interface card local cache, then removes the data backup, And second request message is forwarded to the processor.
8. a kind of acquisition methods of target data characterized by comprising
Receive the first request message from transmitting terminal, wherein first request message is described for obtaining target data Target data is stored in default storage region and is accessed by processor to the default storage region;
According to the judging result for the Backup Data for whether being stored with the target data in network interface card local cache, the target is determined The feedback system of data.
9. according to the method described in claim 8, it is characterized in that, according to whether being stored in the network interface card local cache The judging result of Backup Data determines that the feedback system of the target data includes:
It determines in the network interface card local cache and is stored with the Backup Data;
The Backup Data is back to the transmitting terminal.
10. according to the method described in claim 8, it is characterized in that, whether being stored according in the network interface card local cache The judging result for stating Backup Data determines that the feedback system of the target data includes:
Determining not stored in the network interface card local cache has the Backup Data;
By being forwarded to first request message, Xiang Suoshu processor obtains corresponding with first request message the One response message, wherein the number of targets got from the default storage region is carried in first response message According to;
The target data is back to the transmitting terminal.
11. according to the method described in claim 10, it is characterized in that, by the target data be back to the transmitting terminal it Before, further includes:
Determine that the residual memory space in the network interface card local cache is greater than the memory space occupied needed for the target data;
The target data is backed up into the local cache.
12. according to the method for claim 11, which is characterized in that the target data is being backed up to the local cache Later, further includes:
Record storage duration of the Backup Data in the local cache;
When the storage duration is more than the first preset threshold, determine that the Backup Data is not visited always;
Remove the Backup Data.
13. according to the method described in claim 8, it is characterized in that, whether being stored with according in the network interface card local cache The judging result of the Backup Data, before the feedback system for determining the target data, further includes:
Count the visitation frequency of the target data;
When the visitation frequency is greater than the second preset threshold, the target data is backed up in the local cache.
14. according to the method described in claim 8, it is characterized in that, whether being stored with according in the network interface card local cache The judging result of the Backup Data, after the feedback system for determining the target data, further includes:
Receive the second request message from the transmitting terminal, wherein second request message is for requesting to described pre- If data are written in storage region;
It determines and is stored with data backup corresponding with data to be written in the network interface card local cache;
The data backup is removed, and forwards second request message to the processor.
15. the method according to any one of claim 8 to 14, which is characterized in that the method is suitable for network interface card.
16. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program When control the storage medium where equipment perform claim require any one of 8 to 14 described in target data acquisition side Method.
17. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run Benefit require any one of 8 to 14 described in target data acquisition methods.
18. a kind of system characterized by comprising
Processor;And
Memory is connected to the processor, for providing the instruction for executing following treatment process for the processor:
Receive the first request message from transmitting terminal, wherein first request message is described for obtaining target data Target data is stored in default storage region and is accessed by processor to the default storage region;
According to the judging result for the Backup Data for whether being stored with the target data in network interface card local cache, the target is determined The feedback system of data.
CN201710943640.XA 2017-10-11 2017-10-11 The acquisition methods and device of target data Pending CN109947795A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710943640.XA CN109947795A (en) 2017-10-11 2017-10-11 The acquisition methods and device of target data
PCT/CN2018/108306 WO2019072103A1 (en) 2017-10-11 2018-09-28 Method and apparatus for obtaining target data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710943640.XA CN109947795A (en) 2017-10-11 2017-10-11 The acquisition methods and device of target data

Publications (1)

Publication Number Publication Date
CN109947795A true CN109947795A (en) 2019-06-28

Family

ID=66100388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710943640.XA Pending CN109947795A (en) 2017-10-11 2017-10-11 The acquisition methods and device of target data

Country Status (2)

Country Link
CN (1) CN109947795A (en)
WO (1) WO2019072103A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949273A (en) * 2020-07-31 2020-11-17 深圳市珍爱云信息技术有限公司 File extraction method and device based on iOS system
CN112417022A (en) * 2020-11-27 2021-02-26 深圳市金证科技股份有限公司 Method, device, terminal and storage medium for acquiring data
CN113360318A (en) * 2021-04-22 2021-09-07 山东英信计算机技术有限公司 Data backup method, system, storage medium and equipment
CN113721840A (en) * 2019-10-18 2021-11-30 华为技术有限公司 Data access method and device and first computing equipment
CN114338808A (en) * 2021-12-17 2022-04-12 苏州浪潮智能科技有限公司 Data management method and device and server

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990483B (en) * 2019-11-26 2023-05-30 上海莉莉丝科技股份有限公司 Data access and control method and system for cache nodes in distributed cache
CN111107019A (en) * 2019-12-29 2020-05-05 浪潮电子信息产业股份有限公司 Data transmission method, device, equipment and computer readable storage medium
CN111414383B (en) * 2020-02-21 2024-03-15 车智互联(北京)科技有限公司 Data request method, data processing system and computing device
CN111353773B (en) * 2020-02-24 2024-01-16 网银在线(北京)科技有限公司 Identification processing method and device, storage medium and electronic device
CN113312381B (en) * 2020-07-31 2025-02-14 阿里巴巴集团控股有限公司 Data processing method and device
CN111913765B (en) * 2020-08-17 2024-08-16 中消云(北京)物联网科技研究院有限公司 Data request processing method
CN113177091B (en) * 2021-05-19 2023-10-10 杭州华橙软件技术有限公司 Incremental data storage method and device, storage medium and electronic device
CN114461684A (en) * 2022-02-11 2022-05-10 腾讯科技(深圳)有限公司 Data verification method, apparatus, program product, computer device and medium
CN114844740B (en) * 2022-04-29 2024-01-30 东风电驱动系统有限公司 Dual-chip communication method and chip
CN116661706B (en) * 2023-07-26 2023-11-14 江苏华存电子科技有限公司 Cache cleaning analysis method and system for solid state disk

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030070044A1 (en) * 2001-10-04 2003-04-10 Joseph Jeddeloh Embedded DRAM cache memory and method having reduced latency
CN1992610A (en) * 2005-12-31 2007-07-04 中国科学院计算技术研究所 Intelligent Ethernet card with function of hardware acceleration
CN102244579A (en) * 2010-05-12 2011-11-16 北京研华兴业电子科技有限公司 Network interface card and method for receiving network data
CN102752119A (en) * 2012-07-09 2012-10-24 南京中兴特种软件有限责任公司 A method for implementing an interface of an intelligent network card
CN103441948A (en) * 2013-07-03 2013-12-11 华为技术有限公司 Data access method, network card and storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030070044A1 (en) * 2001-10-04 2003-04-10 Joseph Jeddeloh Embedded DRAM cache memory and method having reduced latency
CN1992610A (en) * 2005-12-31 2007-07-04 中国科学院计算技术研究所 Intelligent Ethernet card with function of hardware acceleration
CN102244579A (en) * 2010-05-12 2011-11-16 北京研华兴业电子科技有限公司 Network interface card and method for receiving network data
CN102752119A (en) * 2012-07-09 2012-10-24 南京中兴特种软件有限责任公司 A method for implementing an interface of an intelligent network card
CN103441948A (en) * 2013-07-03 2013-12-11 华为技术有限公司 Data access method, network card and storage system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721840A (en) * 2019-10-18 2021-11-30 华为技术有限公司 Data access method and device and first computing equipment
CN111949273A (en) * 2020-07-31 2020-11-17 深圳市珍爱云信息技术有限公司 File extraction method and device based on iOS system
CN111949273B (en) * 2020-07-31 2023-04-07 深圳市艾特云信息技术有限公司 File extraction method and device based on iOS system
CN112417022A (en) * 2020-11-27 2021-02-26 深圳市金证科技股份有限公司 Method, device, terminal and storage medium for acquiring data
CN112417022B (en) * 2020-11-27 2024-06-07 深圳市金证科技股份有限公司 Method, device, terminal and storage medium for acquiring data
CN113360318A (en) * 2021-04-22 2021-09-07 山东英信计算机技术有限公司 Data backup method, system, storage medium and equipment
CN114338808A (en) * 2021-12-17 2022-04-12 苏州浪潮智能科技有限公司 Data management method and device and server

Also Published As

Publication number Publication date
WO2019072103A1 (en) 2019-04-18

Similar Documents

Publication Publication Date Title
CN109947795A (en) The acquisition methods and device of target data
CN107682397B (en) Customer resources acquisition methods, device, terminal device and storage medium
CN107832329A (en) Page resource acquisition methods and terminal device
CN108134830A (en) Load balancing method, system, device and storage medium based on message queue
CN107172171A (en) A kind of service request processing method, device and computer-readable recording medium
CN103685426B (en) Message processing device and information processing method
CN110198333A (en) Data capture method and device, storage medium and electronic device
CN106210032A (en) The method and device reported based on terminal data batch
CN108737204A (en) A kind of acquisition method and communication terminal of network performance information
CN105281987B (en) Router and data uploading method, device, system
CN110392123A (en) The methods, devices and systems of detection outlet IP address
CN108462590A (en) The monitoring method and device of network flow, terminal
CN103973753B (en) A kind of method and apparatus of data processing
CN108182119A (en) Read and write abruption control method and device, storage medium and electronic device
CN111984733A (en) Blockchain-based data transmission method, device and storage medium
CN108460044A (en) The treating method and apparatus of data
CN106899558A (en) The treating method and apparatus of access request
CN109032693A (en) Method and device for loading display information, electronic equipment and readable storage medium
CN110474789A (en) Network state information processing method, device and system
CN109246164A (en) A kind of access method, apparatus and system virtualizing network based on cloud
CN118012351A (en) Data read-write order keeping method and device based on remote storage protocol, electronic equipment and storage medium
CN110417860A (en) File transfer management method, apparatus, equipment and storage medium
CN106326296A (en) Data query method and device
CN106067865B (en) The retransmission method and device of data message
CN109522492A (en) A kind of webpage content display control method, device, 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210907

Address after: Room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: ALIBABA GROUP HOLDING Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211129

Address after: 310000 No. 12, Zhuantang science and technology economic block, Xihu District, Hangzhou City, Zhejiang Province

Applicant after: Aliyun Computing Co.,Ltd.

Address before: 310052 room 508, 5th floor, building 4, No. 699 Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Alibaba (China) Co.,Ltd.