[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112988391B - Data processing method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN112988391B
CN112988391B CN202110341058.2A CN202110341058A CN112988391B CN 112988391 B CN112988391 B CN 112988391B CN 202110341058 A CN202110341058 A CN 202110341058A CN 112988391 B CN112988391 B CN 112988391B
Authority
CN
China
Prior art keywords
data
identifier
demarcation
determining
target
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
CN202110341058.2A
Other languages
Chinese (zh)
Other versions
CN112988391A (en
Inventor
许志永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202110341058.2A priority Critical patent/CN112988391B/en
Publication of CN112988391A publication Critical patent/CN112988391A/en
Application granted granted Critical
Publication of CN112988391B publication Critical patent/CN112988391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure relates to a data processing method, a device, equipment and a storage medium. The method comprises the following steps: receiving a data acquisition request sent by a client; determining a target data demarcation identifier in a data set based on the data acquisition request, and determining target data based on each data in the data set which does not exceed the target data demarcation identifier; the data demarcation identifier is used for representing the storage sequence of corresponding data when the corresponding data is stored in the data set; and sending the target data to the client as a data acquisition response. Through the technical scheme, the data are acquired from the same data set every time in the same session, the interference of newly added data is avoided, the effect of data deduplication is achieved, the consumption of the memory in the data deduplication process is reduced, and the equipment performance is improved.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
In internet products, various real-time data paging display scenes exist, such as commodity information display scenes in an electronic commerce system, search result display scenes in a search engine and the like, wherein the related data are real-time data with real-time modification, real-time addition and continuously changing total amount. These real-time data are limited by the display screen size of the client device, which is often loaded and presented in a paged form. In the process of paging and displaying real-time data, because the data in the server side is changed in real time, repetition is likely to exist between the data loaded on the previous page and the data loaded on the subsequent page, and the user experience degree is low.
At present, the method for de-duplication of real-time data aiming at paging display mainly comprises the following steps: in the client or the server, the data of the displayed page and the data of the page to be displayed are cached, and then the data are compared and the repeated data are removed. However, this deduplication method consumes a relatively high amount of memory and may reduce the performance of the client or server.
Disclosure of Invention
To solve or at least partially solve the above technical problems, the present disclosure provides a data processing method, apparatus, device, and storage medium.
The embodiment of the disclosure provides a data processing method, which comprises the following steps:
receiving a data acquisition request sent by a client;
determining a target data demarcation identifier in a data set based on the data acquisition request, and determining target data based on each data in the data set which does not exceed the target data demarcation identifier; the data demarcation identifier is used for representing the storage sequence of corresponding data when the corresponding data is stored in the data set;
and sending the target data to the client as a data acquisition response.
The embodiment of the disclosure also provides a data processing device, which comprises:
the data acquisition request receiving module is used for receiving a data acquisition request sent by the client;
the target data determining module is used for determining a target data demarcation identifier in a data set based on the data acquisition request and determining target data based on the data which does not exceed the target data demarcation identifier in the data set; the data demarcation identifier is used for representing the storage sequence of corresponding data when the corresponding data is stored in the data set;
and the data acquisition response sending module is used for sending the target data to the client as a data acquisition response.
The embodiment of the disclosure also provides an electronic device, which comprises:
a processor and a memory;
the processor is configured to perform the steps of the method described in any of the embodiments of the present disclosure by invoking a program or instructions stored in the memory.
The disclosed embodiments also provide a computer-readable storage medium storing a program or instructions that cause a computer to perform the steps of the methods described in any of the embodiments of the disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the data processing scheme provided by the embodiment of the disclosure, based on a data acquisition request sent by a client, a target data demarcation identifier is determined from a data set of real-time data stored in a server, so that the data set is divided into two parts by means of the target data demarcation identifier, and one part is the target data demarcation identifier in the data set and the data stored before the target data demarcation identifier, which is called stored data; the other part is data stored after the boundary identification of the target data in the data set, which is called newly added data. And determining target data from the stored data parts in the data set according to the data acquisition request, and sending the target data as a data acquisition response to the client. The method and the device realize that data are obtained from stored data in a data set every time in the same session, avoid the interference of newly added data, achieve the effect of data deduplication, reduce the consumption of memory in the process of data deduplication due to the avoidance of data caching operation, and improve the performance of a server or a client due to the omission of data comparison operation.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the disclosure;
fig. 2 is a schematic diagram of an interaction process based on a data processing method according to an embodiment of the disclosure;
FIG. 3 is a flowchart illustrating another data processing method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further detailed description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
The data processing method provided by the embodiment of the disclosure is mainly suitable for obtaining a scene of real-time data without repeatability according to a certain granularity (such as paging or blocking, etc.), for example, a commodity information display scene in an electronic commerce system, a search result display scene in a search engine, a feed stream data display scene, etc. The method may be performed by a data acquisition device, which may be implemented in software and/or hardware, which may be integrated in an electronic device with data storage functionality, such as a notebook, desktop or server, etc.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present disclosure. Referring to fig. 1, the data processing method specifically includes:
s110, receiving a data acquisition request sent by the client.
The client sends a data acquisition request to the data processing device to request acquisition of the data to be displayed. The data acquisition request includes at least a request parameter, i.e., information about the data to be requested, such as the amount of data requested, information about the data that has been requested, and the like.
S120, determining a target data demarcation identifier in the data set based on the data acquisition request, and determining target data based on each data which does not exceed the target data demarcation identifier in the data set.
Wherein a data set is a set for storing pieces of data, wherein the data changes in real time, such as adding new data, changing the storage position of the data, etc. The data demarcation identifies a storage order for characterizing when the corresponding data is stored to the data set. When each piece of data in the data set is inserted into the data set, the storage sequence of the corresponding data is determined, and then the data and the storage sequence of the data are inserted into the data set together. The storage order here is an order in which the data can be represented for insertion into the dataset. In some embodiments, the data demarcation is identified as the system time point or storage order number at which the corresponding data is stored to the data set. The target data demarcation identifier is a data demarcation identifier corresponding to the current session connection and is used for isolating new and old data in the data set, namely the data set is divided into two parts, one part is the target data demarcation identifier in the data set and the data stored before the target data demarcation identifier, and the data is called stored data (old data); the other part is data stored after the boundary identification of the target data in the data set, which is called newly added data (new data).
And the data processing device determines a target data demarcation identifier adapting to the current session connection from the data demarcation identifiers of all pieces of data in the data set according to the information in the data acquisition request. Then, the data processing apparatus acquires data corresponding to the data acquisition request from the stored data with the target data boundary flag as a boundary, as target data.
In some embodiments, determining the target data demarcation identification in the data set based on the data acquisition request in S120 includes:
and step A, judging whether the data acquisition request is the first request of the current session.
After receiving the data acquisition request, the data processing device determines whether the data acquisition request is a first request according to session information (such as a session ID, the number of requests executed in a session, etc.) reserved in a session connection (i.e., a current session) corresponding to the data acquisition request. For example, if the number of requests in the session information of the current session is 0, determining that the data acquisition request is a first request; otherwise, if the number of requests is greater than 0, the data acquisition request is determined to be a non-first request, which is called a subsequent request, a page turning request, or the like.
In some embodiments, step a comprises: if the value of the initial data demarcation identifier carried in the data acquisition request is out of the value range of the data demarcation identifier, determining the data acquisition request as the first request of the current session; if the value of the initial data demarcation identifier is within the value range, determining that the data acquisition request is a non-first request of the current session. The data processing device processes the session information of the current session to determine whether to request for the first time, and may also determine by using a data demarcation identifier (i.e., an initial data demarcation identifier) carried in the data acquisition request. The initial data demarcation identifier may be a default value set in advance and different from any data demarcation identifier, or may be a target data demarcation identifier transmitted to the client by the data processing device. Specifically, the value range of the data demarcation identifier may be predetermined, and the data acquisition request is predetermined to include the initial data demarcation identifier. If the initial data demarcation mark carried in the data acquisition request is an invalid value such as a default value or a null value, the value is out of the value range of the data demarcation mark, and the data processing device is considered to not feed back the data demarcation mark to the client, the data acquisition request is judged to be the first request of the current session. If the value of the initial data demarcation identifier carried in the data acquisition request is within the value range of the data demarcation identifier, the data processing device is considered to feed back the data demarcation identifier to the client, and the data acquisition request is judged to be a non-first request of the current session. The method has the advantages that whether the first request is made or not can be judged more conveniently and the target data demarcation identification can be determined more quickly by carrying out interactive transmission by taking the target data demarcation identification as interactive data.
And B, determining the target data demarcation identification in the data set based on the judging result.
The data processing device can determine the appropriate mode for determining the boundary identification of the target data according to whether the request is first requested, so as to determine the correct boundary identification of the target data.
In some embodiments, step B comprises: if the data acquisition request is the first request of the current session, determining the data demarcation identifier of the data stored last in the data set at the current moment as the target data demarcation identifier. If the data acquisition request is the first request of the current session, acquiring a data demarcation identifier of a piece of data which is finally inserted in the data set at the current moment, and determining the data demarcation identifier as a target data demarcation identifier of the current session.
In some embodiments, step B comprises: if the data acquisition request is a non-first request of the current session, determining an initial data demarcation identifier carried in the data acquisition request as a target data demarcation identifier. Considering that there is no insertion of new data in the stored data, it is able to ensure that there is relatively no variation between the data, the embodiments of the present disclosure set that the data in the same session connection are all obtained from the same subset of data, i.e., all obtained from the stored data delimited by the destination data demarcation identifier, so as to ensure that there is no duplication between the data obtained by multiple requests in one session connection. In view of this, in an embodiment in which the initial data demarcation identifier is carried in the data acquisition request, the target data demarcation identifier is transmitted as fixed interaction data in the primary session connection between the client and the server corresponding to the data processing device. Therefore, if the data acquisition request is a non-first request for the current session, the initial data demarcation identification is the target data demarcation identification.
S130, sending the target data to the client as a data acquisition response.
The data processing apparatus transmits the target data as a data acquisition response to the client.
In some embodiments, S130 comprises: and determining the target data and the target data demarcation identification as a data acquisition response, and sending the data acquisition response to the client. In an embodiment in which the data acquisition request includes an initial data demarcation identifier, the data processing device further transmits the target data demarcation identifier and the target data together as a data acquisition response to the client.
Referring to fig. 2, for an embodiment in which the data acquisition response includes the target data demarcation identifier, the interaction process between the client and the data processing device in the data processing process is: in the first request of the current session, the client carries an initial data demarcation identifier and a request parameter which take a value as a default value, and sends a data acquisition request to the data processing device. And the data processing device sends the target data and the target data demarcation mark to the client as a data acquisition response after processing in S110-130. The client side also carries the initial data demarcation identifier in the subsequent data acquisition request sending process, but the content of the initial data demarcation identifier is not a default value any more, but is a target data demarcation identifier. And repeating the interaction process until the current session is ended. When a new session is established between the client and the server corresponding to the data processing device, a new target data demarcation identifier needs to be determined again according to the process.
According to the technical scheme, the target data demarcation identifier is determined from the data set of the real-time data stored in the server through the data acquisition request sent by the client, so that the data set is divided into two parts by means of the target data demarcation identifier, and one part is the target data demarcation identifier in the data set and the data stored before the target data demarcation identifier, and is called stored data; the other part is data stored after the boundary identification of the target data in the data set, which is called newly added data. And determining target data from the stored data parts in the data set according to the data acquisition request, and sending the target data as a data acquisition response to the client. The method and the device realize that data are obtained from stored data in a data set every time in the same session, avoid the interference of newly added data, achieve the effect of data deduplication, reduce the consumption of memory in the process of data deduplication due to the avoidance of data caching operation, and improve the performance of a server or a client due to the omission of data comparison operation.
Fig. 3 is a flowchart of yet another data processing method provided by an embodiment of the present disclosure. It further optimizes the "determine target data demarcation identification in the dataset based on the data acquisition request". Wherein the explanation of the same or corresponding terms as those of the above embodiments is not repeated herein. Referring to fig. 3, the data processing method includes:
s210, receiving a data acquisition request sent by a client.
S220, determining the current session identification based on the data acquisition request.
The data processing device determines session information of the current session according to the data acquisition request, and determines a session identifier (i.e., the current session identifier) from the session information.
S230, determining a target data demarcation identifier in the data set based on the corresponding relation among the current session identifier, the session identifier and the data demarcation identifier.
For the implementation of interactive transmission by taking the target data demarcation identifier as the interactive information, considering the situation that the interactive information is lost or tampered due to the reasons of network and the like in the interactive process of the client and the server, the situation may cause that the target data demarcation identifier corresponding to the current session is wrong, and further, the data acquired by different requests in the same session may be repeated. Therefore, in some embodiments, the target data demarcation identifier determined in each session may be stored at the server side, that is, the correspondence between the session identifier and the data demarcation identifier is stored. In this way, the data processing device can find out the data demarcation identifier corresponding to the current session identifier from the stored corresponding relationship after determining the current session identifier, and determine the found data demarcation identifier as the target data demarcation identifier corresponding to the current session.
In some embodiments, S230 includes: if the current session identifier and the corresponding relation meet the set conditions, determining the data demarcation identifier of the data stored last in the data set at the current moment as the target data demarcation identifier; correspondingly storing the current session identifier and the target data demarcation identifier in a corresponding relation; the setting condition is that the corresponding relation has no current session identifier, the corresponding relation has no data demarcation identifier corresponding to the current session identifier, or the value of the corresponding data demarcation identifier corresponding to the current session identifier is out of the value range of the data demarcation identifier. The data processing device uses the current session identifier as an index to inquire the corresponding relation between the session identifier and the data demarcation identifier. If the corresponding relation does not have the current session identifier, or the corresponding relation does not have the current session identifier but does not have the corresponding data demarcation identifier, or the corresponding relation does have the current session identifier and the corresponding data demarcation identifier, but the value of the data demarcation identifier is out of the value range of the data demarcation identifier of the data set, the corresponding relation is considered to not have the target data demarcation identifier corresponding to the current session. At this time, the data demarcation identifier of the last piece of data inserted in the dataset at the current moment is obtained, and is determined as the target data demarcation identifier of the current session. Meanwhile, the current session identifier and the target data demarcation identifier need to be correspondingly stored in the corresponding relation.
In some embodiments, S230 includes: and if the value of the data demarcation identifier corresponding to the current dialogue identifier in the corresponding relation is within the value range of the data demarcation identifier, determining the data demarcation identifier corresponding to the current dialogue identifier as the target data demarcation identifier. If the data processing device searches the data demarcation identifier corresponding to the current session identifier from the corresponding relation and is within the value range of the data demarcation identifier in the data set, the searched data demarcation identifier is determined to be the target data demarcation identifier corresponding to the current session.
S240, determining target data based on each data which does not exceed the target data demarcation identification in the data set.
S250, sending the target data to the client as a data acquisition response.
In this embodiment, only the target data is required to be sent to the client as the data acquisition response, and the target data demarcation identifier is stored in the corresponding relationship in the server.
According to the technical scheme, the current session identification is determined based on the data acquisition request sent by the client; and determining the target data demarcation identifier in the data set based on the corresponding relation among the current session identifier, the session identifier and the data demarcation identifier. The method and the device have the advantages that the session identification of each session connection and the corresponding data demarcation identification are stored in the server, and then the target data demarcation identification is determined according to the current session identification, so that the data set is divided, each data acquisition request in the same session acquires data from the target data demarcation identification and the stored data before the target data demarcation identification, the data repetition is avoided, the interaction information of the client and the server can be simplified, the data pulling repetition caused by the error of the target data demarcation identification in the interaction process is avoided, and the data deduplication efficiency is further improved.
Fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present disclosure, where the apparatus may ensure that there is no duplicate data between data obtained at the same granularity (paging or blocking, etc.) by performing a data processing method. As shown in fig. 4, the apparatus includes:
a data acquisition request receiving module 410, configured to receive a data acquisition request sent by a client;
a target data determining module 420, configured to determine a target data demarcation identifier in the data set based on the data acquisition request, and determine target data based on each data in the data set that does not exceed the target data demarcation identifier; the data demarcation identifier is used for representing the storage sequence of corresponding data when the corresponding data is stored in the data set;
the data acquisition response sending module 430 is configured to send the target data to the client as a data acquisition response.
In some embodiments, the target data determination module 420 includes:
the first request judging sub-module is used for judging whether the data acquisition request is the first request of the current session;
and the target data demarcation identification determination submodule is used for determining the target data demarcation identification in the data set based on the judging result.
In some embodiments, the target data demarcation identification determination submodule is specifically configured to:
if the data acquisition request is the first request of the current session, determining the data demarcation identifier of the data stored last in the data set at the current moment as the target data demarcation identifier.
In some embodiments, the target data demarcation identification determination submodule is specifically configured to:
if the data acquisition request is a non-first request of the current session, determining an initial data demarcation identifier carried in the data acquisition request as a target data demarcation identifier.
In some embodiments, the first request determination submodule is specifically configured to:
if the value of the initial data demarcation identifier carried in the data acquisition request is out of the value range of the data demarcation identifier, determining the data acquisition request as the first request of the current session;
if the value of the initial data demarcation identifier is within the value range, determining that the data acquisition request is a non-first request of the current session.
In some embodiments, the data acquisition response sending module 430 is specifically configured to:
and determining the target data and the target data demarcation identification as a data acquisition response, and sending the data acquisition response to the client.
In some embodiments, the target data determination module 420 includes:
a current session identification determining sub-module for determining a current session identification based on the data acquisition request;
and the target data demarcation identification determination submodule is used for determining the target data demarcation identification in the data set based on the corresponding relation among the current session identification, the session identification and the data demarcation identification.
In some embodiments, the target data demarcation identification determination submodule is specifically configured to:
if the current session identifier and the corresponding relation meet the set conditions, determining the data demarcation identifier of the data stored last in the data set at the current moment as the target data demarcation identifier;
correspondingly storing the current session identifier and the target data demarcation identifier in a corresponding relation;
the setting condition is that the corresponding relation has no current session identifier, the corresponding relation has no data demarcation identifier corresponding to the current session identifier, or the value of the corresponding data demarcation identifier corresponding to the current session identifier is out of the value range of the data demarcation identifier.
In some embodiments, the target data demarcation identification determination submodule is specifically configured to:
and if the value of the data demarcation identifier corresponding to the current dialogue identifier in the corresponding relation is within the value range of the data demarcation identifier, determining the data demarcation identifier corresponding to the current dialogue identifier as the target data demarcation identifier.
In some embodiments, the data demarcation is identified as the system time point or storage order number at which the corresponding data is stored to the data set.
According to the data processing device provided by the embodiment of the disclosure, based on a data acquisition request sent by a client, a target data demarcation identifier is determined from a data set of real-time data stored in a server, so that the data set is divided into two parts by means of the target data demarcation identifier, and one part is the target data demarcation identifier in the data set and the data stored before the target data demarcation identifier, which is called stored data; the other part is data stored after the boundary identification of the target data in the data set, which is called newly added data. And determining target data from the stored data parts in the data set according to the data acquisition request, and sending the target data as a data acquisition response to the client. The method and the device realize that data are obtained from stored data in a data set every time in the same session, avoid the interference of newly added data, achieve the effect of data deduplication, reduce the consumption of memory in the process of data deduplication due to the avoidance of data caching operation, and improve the performance of a server or a client due to the omission of data comparison operation.
The data processing device provided by the embodiment of the disclosure can execute the data processing method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method. It should be noted that, in the embodiment of the data processing apparatus, each module and sub-module included are only divided according to the functional logic, but are not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, specific names of the functional modules and the sub-modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present disclosure.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, electronic device 500 includes one or more processors 501 and memory 502.
The processor 501 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities and may control other components in the electronic device 500 to perform desired functions.
Memory 502 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 501 to implement the data processing methods and/or other desired functions of the embodiments of the present disclosure described above. Various content such as data sets, data demarcation identifiers, session identifiers, and the like may also be stored in the computer readable storage medium.
In one example, the electronic device 500 may further include: an input device 503 and an output device 504, which are interconnected by a bus system and/or other form of connection mechanism (not shown). The input device 503 may include, for example, a keyboard, a mouse, and the like. The output device 504 can output various information to the outside. The output device 504 may include, for example, a display, speakers, a printer, and a communication network and remote output apparatus connected thereto, etc.
Of course, only some of the components of the electronic device 500 that are relevant to the present disclosure are shown in fig. 5 for simplicity, components such as buses, input/output interfaces, etc. are omitted. In addition, the electronic device 500 may include any other suitable components depending on the particular application.
In addition to the methods and apparatus described above, embodiments of the present disclosure also provide a computer program product comprising computer programs/instructions which, when executed by a processor, cause the processor to perform the steps of the data processing methods provided by the embodiments of the present disclosure.
The computer program product may write program code for performing the operations of embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium, on which computer program instructions are stored, which, when being executed by a processor, cause the processor to perform the steps of the data processing method provided by the embodiments of the present disclosure.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is noted that the terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present application. As used in the specification and the claims, the terms "a," "an," "the," and/or "the" are not specific to a singular, but may include a plurality, unless the context clearly dictates otherwise. The term "and/or" includes any and all combinations of one or more of the associated listed items. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method or apparatus comprising such elements.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A method of data processing, comprising:
receiving a data acquisition request sent by a client;
determining a target data demarcation identifier in a data set based on the data acquisition request, and determining target data based on each data in the data set which does not exceed the target data demarcation identifier; the data demarcation identifier is used for representing the storage sequence of corresponding data when the corresponding data is stored in the data set; the target data demarcation identifier is a data demarcation identifier adapting to the current session connection, and the target data demarcation identifier is kept unchanged in the current session connection; the data which does not exceed the target data demarcation mark in the data set is stored data, and the data which is located behind the target data demarcation mark in the data set is newly added data; the target data is data corresponding to the data acquisition request in the stored data;
and sending the target data to the client as a data acquisition response.
2. The method of claim 1, wherein determining a target data demarcation identification in a data set based on the data acquisition request comprises:
judging whether the data acquisition request is the first request of the current session or not;
and determining the target data demarcation identification in the data set based on the judgment result.
3. The method of claim 2, wherein determining the target data demarcation identification in the dataset based on the determination comprises:
and if the data acquisition request is the first request of the current session, determining a data demarcation identifier of the data stored last in the data set at the current moment as the target data demarcation identifier.
4. The method of claim 2, wherein determining the target data demarcation identification in the dataset based on the determination comprises:
and if the data acquisition request is a non-first request of the current session, determining an initial data demarcation identifier carried in the data acquisition request as the target data demarcation identifier.
5. The method of claim 2, wherein determining whether the data acquisition request is a first request for a current session comprises:
if the value of the initial data demarcation identifier carried in the data acquisition request is out of the value range of the data demarcation identifier, determining the data acquisition request as the first request of the current session;
and if the value of the initial data demarcation identifier is within the value range, determining that the data acquisition request is a non-first request of the current session.
6. The method of any of claims 1-5, wherein sending the target data to the client as a data acquisition response comprises:
and determining the target data and the target data demarcation identification as the data acquisition response, and sending the data acquisition response to the client.
7. The method of claim 1, wherein determining a target data demarcation identification in a data set based on the data acquisition request comprises:
determining a current session identification based on the data acquisition request;
and determining the target data demarcation identifier in the data set based on the corresponding relation among the current session identifier, the session identifier and the data demarcation identifier.
8. The method of claim 7, wherein determining the target data demarcation identifier in the dataset based on the correspondence between the current session identifier, and data demarcation identifier comprises:
if the current session identifier and the corresponding relation meet a set condition, determining a data demarcation identifier of the last stored data in the data set at the current moment as the target data demarcation identifier;
correspondingly storing the current session identifier and the target data demarcation identifier in the corresponding relation;
the setting condition is that the corresponding relation does not have the current session identifier, the corresponding relation does not have the data demarcation identifier corresponding to the current session identifier, or the value of the data demarcation identifier corresponding to the current session identifier in the corresponding relation is out of the value range of the data demarcation identifier.
9. The method of claim 7, wherein determining the target data demarcation identifier in the dataset based on the correspondence between the current session identifier, and data demarcation identifier comprises:
and if the value of the data demarcation identifier corresponding to the current session identifier in the corresponding relation is within the value range of the data demarcation identifier, determining the data demarcation identifier corresponding to the current session identifier as the target data demarcation identifier.
10. The method of claim 1, wherein the data demarcation is identified as a system time point or storage order number at which the corresponding data is stored to the data set.
11. A data processing apparatus, comprising:
the data acquisition request receiving module is used for receiving a data acquisition request sent by the client;
the target data determining module is used for determining a target data demarcation identifier in a data set based on the data acquisition request and determining target data based on the data which does not exceed the target data demarcation identifier in the data set; the data demarcation identifier is used for representing the storage sequence of corresponding data when the corresponding data is stored in the data set; the target data demarcation identifier is a data demarcation identifier adapting to the current session connection, and the target data demarcation identifier is kept unchanged in the current session connection; the data which does not exceed the target data demarcation mark in the data set is stored data, and the data which is located behind the target data demarcation mark in the data set is newly added data; the target data is data corresponding to the data acquisition request in the stored data;
and the data acquisition response sending module is used for sending the target data to the client as a data acquisition response.
12. An electronic device, the electronic device comprising:
a processor and a memory;
the processor is adapted to perform the steps of the method according to any of claims 1 to 10 by invoking a program or instruction stored in the memory.
13. A computer readable storage medium storing a program or instructions for causing a computer to perform the steps of the method according to any one of claims 1 to 10.
CN202110341058.2A 2021-03-30 2021-03-30 Data processing method, device, equipment and storage medium Active CN112988391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110341058.2A CN112988391B (en) 2021-03-30 2021-03-30 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110341058.2A CN112988391B (en) 2021-03-30 2021-03-30 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112988391A CN112988391A (en) 2021-06-18
CN112988391B true CN112988391B (en) 2023-08-01

Family

ID=76339114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110341058.2A Active CN112988391B (en) 2021-03-30 2021-03-30 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112988391B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120068824A (en) * 2009-08-13 2012-06-27 소니 주식회사 Data processing device, data processing method, program conversion processing device, program conversion processing method, program analysis processing device, program analysis processing method, history storing device, program, compile processing device, and compile processing method
US9330119B2 (en) * 2013-04-11 2016-05-03 Oracle International Corporation Knowledge intensive data management system for business process and case management
CN103984779A (en) * 2014-06-06 2014-08-13 北京联时空网络通信设备有限公司 Data updating method and device
CN105653474B (en) * 2015-12-29 2018-11-06 东南大学—无锡集成电路技术研究所 A kind of allocating cache controller towards coarseness dynamic reconfigurable processor
CN106385322B (en) * 2016-09-07 2019-11-15 海能达通信股份有限公司 A kind of data group calling method, apparatus and system
CN107146133A (en) * 2017-04-28 2017-09-08 柳州市啪啪微订网络科技有限公司 Order system based on wechat platform
CN111723124B (en) * 2019-03-20 2023-03-28 杭州海康威视数字技术股份有限公司 Data collision analysis method and device, electronic equipment and storage medium
US10990993B2 (en) * 2019-05-23 2021-04-27 Capital One Services, Llc Securing lender output data
CN112528274B (en) * 2020-12-24 2023-09-22 微医云(杭州)控股有限公司 Data processing method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112988391A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
US11449570B2 (en) Data caching method and apparatus
CN107948314B (en) Business processing method and device based on rule file and server
WO2015161658A1 (en) Webpage resource loading method and device
CN107105336B (en) Data processing method and data processing device
CN109871251B (en) Response data processing method and device, storage medium and terminal equipment
CN111737564B (en) Information query method, device, equipment and medium
KR101689745B1 (en) Web browsing system and method for rendering dynamic resource URI of script
CN110515631B (en) Method for generating application installation data packet, server and computer storage medium
CN107992569B (en) Data access method and device, electronic equipment and computer readable storage medium
CN104932910A (en) Method and system for application program interface extension
CN112100092B (en) Information caching method, device, equipment and medium
EP3107010B1 (en) Data integration pipeline
CN108763524B (en) Electronic device, chatting data processing method, and computer-readable storage medium
US11544069B2 (en) Universal pointers for data exchange in a computer system having independent processors
CN111125156A (en) Data query method and device and electronic equipment
CN113536168B (en) Component processing method and device
CN113760242B (en) Data processing method, device, server and medium
US11570280B2 (en) Systems and methods for rendering interactive web pages
CN112988391B (en) Data processing method, device, equipment and storage medium
CN111367606A (en) Application page display method, device, terminal and medium
CN106777055B (en) Method and device for realizing website interfacing rendering
WO2022135410A1 (en) Method and apparatus for loading source file
CN111367921A (en) Data object refreshing method and device
EP3889800A2 (en) Information search method and apparatus
CN114186148A (en) Page loading 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
GR01 Patent grant
GR01 Patent grant