WO2014067437A1 - 数据处理的方法和系统 - Google Patents

数据处理的方法和系统 Download PDF

Info

Publication number
WO2014067437A1
WO2014067437A1 PCT/CN2013/086090 CN2013086090W WO2014067437A1 WO 2014067437 A1 WO2014067437 A1 WO 2014067437A1 CN 2013086090 W CN2013086090 W CN 2013086090W WO 2014067437 A1 WO2014067437 A1 WO 2014067437A1
Authority
WO
WIPO (PCT)
Prior art keywords
operation request
minimum
unit
data buffer
buffer layer
Prior art date
Application number
PCT/CN2013/086090
Other languages
English (en)
French (fr)
Inventor
王辉
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to US14/439,580 priority Critical patent/US9357027B2/en
Publication of WO2014067437A1 publication Critical patent/WO2014067437A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • 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/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/306User profiles

Definitions

  • the present invention relates to the field of network communication technologies, and in particular, to a data processing method and system. Background technique
  • a long relationship chain user refers to a user whose number of listeners exceeds a certain number, such as a star authenticated user. Since the long relationship chain users have too many listeners and the amount of data generated is relatively large, how to improve the speed of responding to huge requests and complete services as soon as possible is a basic problem that needs to be solved.
  • the data buffer layer receives an operation request of a listener of a long relationship chain user of the client, where the operation request includes: adding a listener request, modifying a listener request, or deleting a listener request, etc.; afterwards, the data buffer layer receives The operation request is synchronized to the stream module; after receiving the operation request sent by the data buffer layer, the Stream module saves each operation request in the corresponding database in hours, and the database completely stores a long All the listener information of the relationship chain user; afterwards, the Stream module actively pushes the operation request in each database to the Friend module at regular intervals; after receiving the operation request pushed by the Stream module, the Friend module follows the operation request The listener information in the database corresponding to the long relationship chain user performs an operation.
  • the embodiment of the present invention provides a data processing method and system.
  • the technical solution is as follows:
  • a method of data processing comprising: The data buffer layer receives an operation request of a listener of the long relationship chain user of the client, and pushes the operation request to the business layer;
  • the service layer Receiving, by the service layer, the operation request that is sent by the data buffer layer, and buffering the operation request according to a minimum storage unit, where the minimum storage unit is divided by the long relationship chain user;
  • the service layer finds a designated database belonging to the long relationship chain user according to a preset routing configuration, and requests the specified The database operates.
  • the pushing the operation request to the service layer includes:
  • the data buffer layer calculates a minimum operating unit of the long relationship chain user, routing the operation request to the minimum operating unit of the business layer.
  • the service layer receives the operation request that is pushed by the data buffer layer, and caches the operation request according to a minimum storage unit, including:
  • the warehousing process in the business layer reads the minimum operation unit to obtain the operation request in the minimum operation unit, and calculates a minimum storage unit to which the operation request belongs, and caches the operation request to In the minimum storage unit.
  • the method further includes:
  • the receiving process adds one to the synchronization sequence number of the minimum operation unit, where the synchronization sequence number is used to identify the synchronization progress of the receiving process and the data buffer layer.
  • the inbound process in the service layer reads the minimum operation unit to obtain the operation request in the minimum operation unit, including:
  • the warehousing process reads the synchronization sequence number of the minimum operation unit in the receiving process, and determines whether the synchronization sequence number of the minimum operation unit is greater than the read sequence number of the minimum operation unit saved locally, and if so, reads And taking the operation request in the minimum operation unit, where the read sequence number is used to identify a synchronization progress of the warehousing process and the receiving process.
  • a system for data processing includes: a data buffer layer and a service layer; the data buffer layer is configured to receive an operation request of a listener of a long relationship chain user of the client, and An operation request is pushed to the business layer;
  • the service layer is configured to receive the operation request pushed by the data buffer layer, and press the operation request Caching according to a minimum storage unit, wherein the minimum storage unit is divided by the long relationship chain user;
  • the service layer is further configured to: when the data cached in the minimum storage unit reaches a preset condition, find a designated database that belongs to the long relationship chain user according to a preset routing configuration, and follow the operation request.
  • the specified database operates.
  • the data buffer layer is configured to calculate a minimum operation unit of the long relationship chain user, and route the operation request to the minimum operation unit of the service layer.
  • the service layer includes a receiving process and a warehousing process
  • a receiving process in the service layer configured to receive the operation request pushed by the data buffer layer, and cache the operation request into the minimum operation unit;
  • the inbound process in the service layer is configured to read the minimum operation unit to obtain the operation request in the minimum operation unit, and calculate a minimum storage unit to which the operation request belongs, and the operation is performed.
  • the request is cached into the smallest storage unit.
  • the receiving process in the service layer is further configured to add one to the synchronization sequence number of the minimum operation unit, where the synchronization sequence number is used to identify the synchronization progress of the receiving process and the data buffer layer. .
  • the warehousing process in the service layer is used by the warehousing process to read the synchronization sequence number of the minimum operation unit in the receiving process, and determine whether the synchronization sequence number of the minimum operation unit is greater than locally saved a read sequence number of the minimum operation unit, if yes, reading the operation request in the minimum operation unit, wherein the read sequence number is used to identify synchronization between the warehousing process and the receiving process schedule.
  • the data buffer layer receives an operation request of a listener of a long relationship chain user of the client, and pushes the operation request to the service layer;
  • the service layer receives the data An operation request that is sent by the buffer layer, and the operation request is cached according to a minimum storage unit; when the data cached in the minimum storage unit reaches a preset condition, the service layer finds the information according to a preset routing configuration.
  • the specified database of the long relationship chain user and operates on the specified database according to the operation request.
  • the service layer when the service layer receives the operation request of the listener pushed by the data buffer layer, the service layer can store the operation request according to the minimum storage unit, thereby implementing the batch operation on the underlying database. It reduces the operational burden of data and improves the processing speed of the listener information of long relationship chains.
  • FIG. 1 is a schematic diagram of a system for data processing according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of another system for data processing according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of a method for data processing according to Embodiment 2 of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention. detailed description
  • a data processing system is provided in this embodiment, where the system includes: a data buffer layer 101 and a service layer 102;
  • the data buffer layer 101 is configured to receive an operation request of a listener of a long relationship chain user of the client, and push the operation request to the service layer 102;
  • the service layer 102 is configured to receive the operation request that is sent by the data buffer layer 101, and cache the operation request according to a minimum storage unit, where the minimum storage unit is the long relationship chain user. Divided into units;
  • the service layer 102 is further configured to: when the data cached in the minimum storage unit reaches a preset condition, find a designated database that belongs to the long relationship chain user according to a preset routing configuration, and follow the operation request. Operate the specified database.
  • the data buffer layer 101 is configured to calculate a minimum operation unit of the long relationship chain user, and route the operation request to the minimum operation unit of the service layer 102.
  • the service layer 102 further includes a receiving process 102a and a warehousing process 102b.
  • the receiving process 102a in the service layer 102 is configured to receive the data buffer layer 101 and push it. The operation request, and buffering the operation request into the minimum operation unit;
  • the warehousing process 102b in the business layer 102 is configured to read the minimum operation unit to obtain the operation request in the minimum operation unit, and calculate a minimum storage unit to which the operation request belongs, The operation request is cached into the minimum storage unit.
  • the receiving process 102a in the service layer 102 is further used to synchronize the sequence of the minimum operating unit.
  • the number is cumulatively added, wherein the synchronization sequence number is used to identify the synchronization progress of the receiving process 102a and the data buffer layer 101.
  • the warehousing process 102b in the service layer 102 is configured to read the synchronization sequence number of the minimum operation unit in the receiving process 102a, and determine whether the synchronization sequence number of the minimum operation unit is greater than the minimum value saved locally. Reading the sequence number of the operation unit, if yes, reading the operation request in the minimum operation unit, wherein the read sequence number is used to identify the synchronization progress of the warehousing process 102b and the receiving process 102a .
  • the beneficial effect of the embodiment is: the data buffer layer receives an operation request of the listener of the long relationship chain user of the client, and pushes the operation request to the service layer; the service layer receives the operation request pushed by the data buffer layer
  • the operation request is cached according to a minimum storage unit; when the data cached in the minimum storage unit reaches a preset condition, the service layer finds a designated user belonging to the long relationship chain according to a preset route configuration. a database, and operating on the specified database in accordance with the operation request.
  • the service layer By dividing the minimum storage unit by the long relationship chain user unit, when the service layer receives the operation request of the listener pushed by the data buffer layer, the service layer can store the operation request according to the minimum storage unit, thereby implementing the batch operation on the underlying database. It reduces the operational burden of data and improves the processing speed of the listener information of long relationship chains.
  • the embodiment provides a data processing method, including:
  • the data buffer layer receives an operation request of a listener of the long relationship chain user of the client, and pushes the operation request to the service layer.
  • the service layer receives the operation request that is sent by the data buffer layer, and caches the operation request according to a minimum storage unit, where the minimum storage unit is performed by using the long relationship chain user. Divided
  • the service layer finds a designated database that belongs to the long relationship chain user according to a preset routing configuration, and performs the operation according to the operation request.
  • the specified database is operating.
  • the step of pushing the operation request to the service layer includes but is not limited to:
  • the data buffer layer calculates a minimum operation unit of the long relationship chain user, and routes the operation request to the minimum operation unit of the service layer.
  • the service layer receives the operation request pushed by the data buffer layer, and caches the operation request according to a minimum storage unit, including but not limited to: Receiving, by the receiving process in the service layer, the operation request pushed by the data buffer layer, and buffering the operation request into the minimum operation unit;
  • the warehousing process in the business layer reads the minimum operation unit to obtain the operation request in the minimum operation unit, and calculates a minimum storage unit to which the operation request belongs, and caches the operation request to In the minimum storage unit.
  • the method further includes:
  • the receiving process adds one to the synchronization sequence number of the minimum operation unit, where the synchronization sequence number is used to identify the synchronization progress of the receiving process and the data buffer layer.
  • the inbound process in the service layer reads the minimum operation unit to obtain the operation request in the minimum operation unit, including but not limited to:
  • the warehousing process reads the synchronization sequence number of the minimum operation unit in the receiving process, and determines whether the synchronization sequence number of the minimum operation unit is greater than the read sequence number of the minimum operation unit saved locally, and if so, reads And taking the operation request in the minimum operation unit, where the read sequence number is used to identify a synchronization progress of the warehousing process and the receiving process.
  • the beneficial effect of the embodiment is: the data buffer layer receives an operation request of the listener of the long relationship chain user of the client, and pushes the operation request to the service layer; the service layer receives the operation request pushed by the data buffer layer And the operation request is cached according to the minimum storage unit; when the data cached in the minimum storage unit reaches a preset condition, the service layer finds a user belonging to the long relationship chain according to a preset route configuration.
  • the specified database, and the specified database is operated according to the operation request.
  • an embodiment of the present invention provides a data processing method, where the method process includes:
  • the data buffer layer receives an operation request of a listener of a long relationship chain user of the client, and pushes the operation request to the service layer.
  • the data buffer layer pushes the operation request to the service layer, including but not limited to:
  • a data buffer layer calculates a minimum operating unit of the long relationship chain user, routing the operation request to the minimum In the operating unit.
  • the service layer is divided into a receiving process and a warehousing process, and the buffer in the receiving process is divided into a plurality of minimum operating units; wherein, the minimum operating unit is obtained by the long relationship chain user Uin modulo 4999.
  • the Uin includes the account number of the user, and the like, which is not specifically limited in this embodiment.
  • the minimum operation unit of the long relationship chain user is calculated, wherein the specific calculation method is to use the long relationship chain user Uin module 4999.
  • the operation request is routed to the business layer according to the minimum operation unit of the long relationship chain user.
  • the operation request of the listener of the long relationship chain user includes: adding a request, deleting the request, forwarding the message request, or requesting a comment on the message, etc., which is not specifically limited in this embodiment.
  • the receiving process in the service layer receives an operation request pushed by the data buffer layer, and caches the operation request into a minimum operation unit.
  • the receiving process caches the received operation request into the minimum operation unit according to the routing destination address of the data buffer layer.
  • the operation request is used to record the audience operation information of the long relationship chain user. For example, record long relationship chain user X add listener a; record long relationship chain user y add listener b; record long relationship chain user X delete listener c, etc.
  • the receiving process saves a synchronization sequence number for each of the minimum operation units in the cache, and the synchronization sequence number is used to identify the synchronization progress of the receiving process and the data buffer layer. After the receiving process receives an operation request, it adds one to the synchronization sequence number of the smallest operating unit that caches the operation request.
  • the third minimum operating unit is saved after the third minimum operating unit saves the operation request.
  • the synchronization sequence number is incremented by one.
  • the synchronization sequence number of the minimum operation unit is cumulatively increased by one. For example, if the original synchronization sequence number is 5, the cumulative one is 6 and then.
  • the inbound process in the service layer reads the minimum operation unit to obtain the operation request in the minimum operation unit.
  • the receiving sequence is a synchronization sequence number saved by each of the minimum operating units
  • the warehousing process saves a corresponding reading sequence number for each of the minimum operating units, and the reading sequence number is used to identify the warehousing process and the receiving process.
  • Synchronization progress that is, the progress of the synchronization of the operation request and the receiving process in each of the smallest operation units read by the inbound process.
  • the warehousing process determines whether there is a new synchronous operation request in a certain operation unit by comparing the read sequence number and the synchronization sequence number, so that a new operation request can be read in time.
  • the inbound process in the service layer reads the minimum operation unit to obtain an operation request in the minimum operation unit, which specifically includes:
  • the warehousing process reads the synchronization sequence number of the minimum operation unit in the receiving process, and determines whether the synchronization sequence number of the minimum operation unit is greater than the read sequence number of the minimum operation unit saved locally, and if so, reads The operation request in the minimum operation unit is taken.
  • the warehousing process calculates a minimum storage unit to which the operation request belongs, and caches the operation request according to the minimum storage unit.
  • the smallest data storage unit is re-divided in units of long relationship chain users, so that a long relationship chain user corresponds to a database, so that the inbound process only needs to operate on a certain minimum operation unit when performing data processing. Instead of having to manipulate the data of all long relationship chain users, the burden of data operations is reduced.
  • the listener information of the long relationship chain user may be further divided, so that a minimum operation unit only includes the part of the long relationship chain user. Audience information.
  • the preset number may be preset according to the experience value, and may also be adjusted according to the current operating efficiency of the system, which is not specifically limited in this embodiment.
  • the warehousing process calculates the minimum storage unit to which the operation request belongs, including but not limited to: according to the long relationship chain user Uin, the listener Uin, and the configured minimum number of storage units of the long relationship chain user, The smallest storage unit to which the operation request belongs.
  • the specific representation is as follows: Long relationship chain user Uin—the number of the smallest storage unit configured by the fan Uin%. For example, if the Uin of the long relationship chain user is configured to be 12345678, and the minimum storage unit is configured for it, the configured minimum storage.
  • the units are: 12345678-0, 12345678-1, . . . , 12345678-8.
  • the operation request is cached according to the minimum storage unit, that is, the operation request is cached in the minimum storage unit.
  • Steps 302-304 are performed by the service layer to receive an operation request pushed by the data buffer layer, and the operation request is cached according to the minimum storage unit.
  • the warehousing process determines whether the data cached in the minimum storage unit reaches a preset condition, and if yes, executes step 306, otherwise returns to step 303 to execute;
  • the warehousing process periodically scans each of the minimum storage units, and when it is detected that a certain minimum storage unit reaches the warehousing condition, the operation data in the minimum storage unit is routed to the corresponding database for storage.
  • the warehousing process scans to the minimum storage unit in step 304, it is determined whether the data cached in the minimum storage unit reaches a preset condition, and if so, the entry of the data in the minimum storage unit is performed. Library operations.
  • the preset condition that is, the storage condition may be preset according to the experience value, or may be adjusted in real time according to the current running condition of the system, which is not specifically limited in this embodiment. 306.
  • the service layer finds a specified database that belongs to the long relationship chain user according to a preset routing configuration, and performs operations on the specified database according to the operation request.
  • a plurality of databases are set, and routing configuration is performed in advance according to the rule of the long relationship chain user Uin modulo 4999, and the service layer finds a designated database belonging to the long relationship chain user according to a preset routing configuration, and according to the The operation request operates on the specified database. For example, if the operation request is to add a friend request, the data addition operation is performed in the database, and the operation request is a deletion request, and the data deletion operation is performed in the database.
  • the beneficial effect of the embodiment is: the data buffer layer receives an operation request of the listener of the long relationship chain user of the client, and pushes the operation request to the service layer; the service layer receives the operation request pushed by the data buffer layer
  • the operation request is cached according to a minimum storage unit; when the data cached in the minimum storage unit reaches a preset condition, the service layer finds a designated user belonging to the long relationship chain according to a preset route configuration. a database, and operating on the specified database in accordance with the operation request.
  • the service layer can store the operation request according to the minimum storage unit, thereby implementing the batch operation on the underlying database. It reduces the operational burden of data and improves the processing speed of the listener information of long relationship chains.
  • the operation request is saved to a different database, so that the user's audience information is separated from the database level, further reducing the operation load of the server and improving the performance of the system.
  • the buffering is also performed in units of the minimum operating unit, thereby further reducing the operational burden of the service layer and improving the processing speed of the data.
  • an embodiment of the present invention provides a schematic structural diagram of a terminal, which is a schematic structural diagram of a touch sensitive surface according to an embodiment of the present invention.
  • the terminal can be used to implement data processing provided in the foregoing embodiment. Methods. Specifically:
  • the terminal 500 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, including One or more processing core processor 180, and power supply 190 and the like.
  • RF Radio Frequency
  • the RF circuit 110 can be used for receiving and transmitting signals during and after receiving or transmitting information, in particular, after receiving downlink information of the base station, and processing it by one or more processors 180; in addition, transmitting uplink data to the base station .
  • the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, and an LNA (Low Noise). Put Large), duplexer, etc.
  • SIM Subscriber Identity Module
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobi le communication), GPRS (General Packet Radio Service) CDMA (Code Division Multiple Access) , Code Division Multiple Access) WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service, Short Message Service), etc.
  • GSM Global System of Mobi le communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Messaging Service
  • Short Message Service Short Message Service
  • the memory 120 can be used to store software programs and modules, such as software programs and modules corresponding to the devices for improving the running speed of the application in the third embodiment, and the processor 180 executes various functions by running software programs and modules stored in the memory 120.
  • Application and data processing such as improving the running speed of the application.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to terminal
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 120 may also include a memory controller to provide access to memory 120 by processor 180 and input unit 130.
  • the input unit 130 can be used to receive input numeric or character information, as well as to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input unit 130 can include touch sensitive surface 131 as well as other input devices 132.
  • Touch-sensitive surface 131 also referred to as a touch display or trackpad, can collect touch operations on or near the user (eg, the user uses a finger, stylus, etc., on any touch-sensitive surface 131 or on the touch-sensitive surface 131 The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 131 may include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information
  • the processor 180 is provided and can receive commands from the processor 180 and execute them.
  • the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 130 can also include other input devices 132.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal 500, which can be composed of graphics, text, icons, video, and any combination thereof.
  • the display unit 140 may include a display panel 141.
  • the display surface may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Board 141.
  • the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141.
  • touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
  • Terminal 500 can also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the terminal 500 moves to the ear. / or backlight.
  • the gravity acceleration sensor can detect the acceleration of each direction (usually three axes), and the magnitude and direction of gravity can be detected at rest, which can be used to identify the gesture of the mobile phone.
  • terminal 500 can also be configured with gyroscope, barometer, hygrometer, thermometer, infrared sensor Other sensors, etc., will not be described here.
  • the audio circuit 160, the speaker 161, and the microphone 162 provide an audio interface between the user and the terminal 500.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the terminal, for example, by the RF circuit 110, or outputted to the memory 120 for further processing.
  • the audio circuit 160 may also include an earbud jack to provide communication between the peripheral earphone and the terminal 500.
  • the terminal 500 can help the user to send and receive emails, browse web pages, access streaming media, etc. through the transmission module 170, and provides the user with wireless or wired broadband Internet access.
  • the transmission module 170 is shown in Fig. 5, it can be understood that it does not belong to the essential configuration of the terminal 500, and can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 180 is the control center of the terminal 500, connecting various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120, The various functions and processing data of the terminal 500 are performed to perform overall monitoring of the mobile phone.
  • the processor 180 may include one or more processing cores.
  • the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 180.
  • the terminal 500 also includes a power source 190 (such as a battery) for powering various components.
  • a power source 190 such as a battery
  • the power source can be logically coupled to the processor 180 through a power management system to manage charging, discharging, and power consumption through the power management system. Management and other functions.
  • Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal 500 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
  • the display unit of the terminal is a touch screen display
  • the terminal further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be processed by one or more
  • the execution of one or more programs includes instructions for performing the following operations:
  • the data buffer layer receives an operation request of a listener of the long relationship chain user of the client, and pushes the operation request to the service layer;
  • the service layer receives the operation request that is sent by the data buffer layer, and caches the operation request according to a minimum storage unit, where the minimum storage unit is divided by the long relationship chain user.
  • the service layer finds a designated database belonging to the long relationship chain user according to a preset routing configuration, and specifies the specified according to the operation request.
  • the database is operating.
  • the memory of the terminal further includes an instruction for performing the following operations. :
  • the data buffer layer calculates a minimum operating unit of the long relationship chain user, routing the operation request to the minimum operating unit of the business layer.
  • the memory of the terminal further includes an instruction for performing the following operations:
  • the warehousing process in the business layer reads the minimum operation unit to obtain the operation request in the minimum operation unit, and calculates a minimum storage unit to which the operation request belongs, and caches the operation request to In the minimum storage unit.
  • the memory of the terminal further includes an instruction for performing the following operations:
  • the receiving process adds one to the synchronization sequence number of the minimum operation unit, where the synchronization sequence number is used to identify the synchronization progress of the receiving process and the data buffer layer.
  • the memory of the terminal further includes an instruction for performing the following operations:
  • the warehousing process reads a synchronization sequence number of the minimum operation unit in the receiving process, and determines the minimum operation Whether the synchronization sequence number of the unit is greater than the read sequence number of the minimum operation unit saved locally, and if yes, reading the operation request in the minimum operation unit, where the read sequence number is used to identify the entry The progress of the synchronization of the library process with the receiving process.
  • the data buffer layer receives an operation request of the listener of the long relationship chain user of the client, and pushes the operation request to the service layer;
  • the service layer receives the data buffer layer The operation request is pushed, and the operation request is cached according to a minimum storage unit; when the data cached in the minimum storage unit reaches a preset condition, the service layer finds the long relationship according to the preset routing configuration. Chaining the specified database of the user and operating the specified database in accordance with the operation request.
  • the service layer can store the operation request according to the minimum storage unit, thereby implementing the batch operation on the underlying database. It reduces the operational burden of data and improves the processing speed of the listener information of long relationship chains.
  • the operation request is saved to a different database, so that the user's audience information is separated from the database level, further reducing the operational burden of the server and improving the performance of the system.
  • the buffering is also performed in units of the minimum operating unit, thereby further reducing the operational burden of the service layer and improving the processing speed of the data.
  • the embodiment of the present invention provides a computer readable storage medium, which may be a computer readable storage medium included in the memory in the above embodiment, or may exist separately and not assembled into the terminal.
  • Computer readable storage medium stores one or more programs, the one or more programs being used by one or more processors to perform a method of data processing, the method comprising:
  • the data buffer layer receives an operation request of a listener of the long relationship chain user of the client, and pushes the operation request to the service layer;
  • the service layer receives the operation request that is sent by the data buffer layer, and caches the operation request according to a minimum storage unit, where the minimum storage unit is divided by the long relationship chain user.
  • the service layer finds a designated database belonging to the long relationship chain user according to a preset routing configuration, and specifies the specified according to the operation request.
  • the database is operating.
  • the pushing the operation request to the service layer includes:
  • the data buffer layer calculates a minimum operation unit of the long relationship chain user, and routes the operation request to the service In the minimum operating unit of the layer.
  • the service layer receives the operation request pushed by the data buffer layer, and performs the operation request according to a minimum storage unit.
  • Cache including:
  • the warehousing process in the business layer reads the minimum operation unit to obtain the operation request in the minimum operation unit, and calculates a minimum storage unit to which the operation request belongs, and caches the operation request to In the minimum storage unit.
  • the receiving process in the service layer receives the operation request pushed by the data buffer layer, and the operation request is After the log is cached in the minimum operating unit, it also includes:
  • the receiving process adds one to the synchronization sequence number of the minimum operation unit, where the synchronization sequence number is used to identify the synchronization progress of the receiving process and the data buffer layer.
  • the warehousing process in the service layer reads the minimum operation unit to obtain the foregoing in the minimum operation unit
  • the operation request includes: the warehousing process reads a synchronization sequence number of the minimum operation unit in the receiving process, and determines whether a synchronization sequence number of the minimum operation unit is greater than a locally read sequence number of the minimum operation unit, If yes, the operation request in the minimum operation unit is read, wherein the read sequence number is used to identify a synchronization progress of the warehousing process and the receiving process.
  • the beneficial effect of the embodiment is: the data buffer layer receives an operation request of the listener of the long relationship chain user of the client, and pushes the operation request to the service layer; the service layer receives the operation request pushed by the data buffer layer
  • the operation request is cached according to a minimum storage unit; when the data cached in the minimum storage unit reaches a preset condition, the service layer finds a designated user belonging to the long relationship chain according to a preset route configuration. a database, and operating on the specified database in accordance with the operation request.
  • the service layer can store the operation request according to the minimum storage unit, thereby implementing the batch operation on the underlying database. It reduces the operational burden of data and improves the processing speed of the listener information of long relationship chains.
  • the operation request is saved to a different database, so that the user's audience is separated from the database level, further reducing the operational burden of the server and improving the performance of the system.
  • the buffering is also performed in units of the minimum operating unit, thereby further reducing the operational burden of the service layer and improving the processing speed of the data.
  • a graphical user interface is provided in an embodiment of the present invention, where the graphical user interface is used on a terminal, where the terminal includes a touch screen display, a memory, and one or more processors for executing one or more programs;
  • the graphical user interface includes:
  • the service layer receives the operation request that is sent by the data buffer layer, and caches the operation request according to a minimum storage unit, where the minimum storage unit is divided by the long relationship chain user.
  • the service layer finds a designated database belonging to the long relationship chain user according to a preset routing configuration, and specifies the specified according to the operation request.
  • the database is operating.
  • the beneficial effect of the embodiment is: the data buffer layer receives an operation request of the listener of the long relationship chain user of the client, and pushes the operation request to the service layer; the service layer receives the operation request pushed by the data buffer layer
  • the operation request is cached according to a minimum storage unit; when the data cached in the minimum storage unit reaches a preset condition, the service layer finds a designated user belonging to the long relationship chain according to a preset route configuration. a database, and operating on the specified database in accordance with the operation request.
  • the service layer can store the operation request according to the minimum storage unit, thereby implementing the batch operation on the underlying database. It reduces the operational burden of data and improves the processing speed of the listener information of long relationship chains.
  • the operation request is saved to a different database, so that the user's audience information is separated from the database level, further reducing the operation load of the server and improving the performance of the system.
  • the buffering is also performed in units of the minimum operating unit, thereby further reducing the operational burden of the service layer and improving the processing speed of the data.
  • the related hardware may be instructed by a program, and the program may be stored in a computer readable storage medium, and the storage medium mentioned above may be a read only memory, a magnetic disk or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种数据处理的方法和系统,属于网络通信技术领域。所述方法包括:数据缓冲层接收客户端的长关系链用户的听众的操作请求,并将所述操作请求推送到业务层;所述业务层接收所述数据缓冲层推送过来的所述操作请求,将所述操作请求按照最小存储单元进行缓存,其中所述最小存储单元是以所述长关系链用户为单位进行划分的;当所述最小存储单元中缓存的数据达到预设条件时,所述业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库,并按照所述操作请求对所述指定的数据库进行操作。

Description

数据处理的方法和系统 本申请要求于 2012年 10月 29日提交中国专利局、 申请号为 201210420674. 8、发明名 称为 "数据处理的方法和系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本 申请中。 技术领域
本发明涉及网络通信技术领域, 特别涉及一种数据处理的方法和系统。 背景技术
随着微博的兴起, 越来越多的网络用户加入到微博用户中, 甚至出现了一批长关系链 用户。 长关系链用户是指听众数超过一定数目的用户, 如明星认证用户。 由于长关系链用 户的听众太多, 产生的数据量比较大, 所以服务端如何提高响应巨量请求的速度, 尽快完 成服务, 是需要解决的基本问题。
现有技术中, 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 其中, 操作 请求包括: 新增听众请求、 修改听众请求或删除听众请求等等; 之后, 数据缓冲层将接收 到的操作请求同步到流模块,; Stream (流) 模块在接收到数据缓冲层发送的操作请求后, 以小时为单位将各个操作请求保存在与其对应的数据库中, 且数据库中完整保存了一个长 关系链用户的全部听众信息; 之后, Stream模块每隔一定时间主动推送各个数据库中的操 作请求至 Friend (朋友) 模块; Friend模块在接收到 Stream模块推送的操作请求后, 按 照该操作请求对该长关系链用户对应的数据库中的听众信息执行操作。
在实现本发明的过程中, 发明人发现现有技术至少具有以下问题:
由于一个数据库中既保存了操作请求, 也保存了一个长关系链的全部听众信息, 因此, Stream模块和 Friend模块的数据操作动作过慢, 导致数据缓冲层的处理速度与 Stream模 块和 Friend模块的处理速度不同步,从而导致对长关系链用户的听众信息的处理速度较低。 发明内容
为了提高对长关系链用户的听众信息的处理速度, 本发明实施例提供了一种数据处理 的方法和系统。 所述技术方案如下:
一方面, 提供了一种数据处理的方法, 所述方法包括: 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到 业务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小 存储单元进行缓存, 其中所述最小存储单元是以所述长关系链用户为单位进行划分的; 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置 找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进 行操作。
进一步地, 所述将所述操作请求推送到业务层, 包括:
数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到所述业务 层的所述最小操作单元中。
进一步地, 所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请 求按照最小存储单元进行缓存, 包括:
所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操 作请求缓存到所述最小操作单元中;
所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述 操作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小存 储单元中。
进一步地, 所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操作请求的日志缓存到所述最小操作单元中之后, 还包括:
所述接收进程对所述最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标 识所述接收进程与所述数据缓冲层的同步进度。
进一步地, 所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单 元中的所述操作请求, 包括:
所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作 单元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述 最小操作单元中的所述操作请求, 其中, 所述读取序号用于标识所述入库进程与所述接收 进程的同步进度。
另一方面, 提供了一种数据处理的系统, 所述系统包括: 数据缓冲层和业务层; 所述数据缓冲层, 用于接收客户端的长关系链用户的听众的操作请求, 并将所述操作 请求推送到所述业务层;
所述业务层, 用于接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按 照最小存储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划 分的;
所述业务层, 还用于当所述最小存储单元中缓存的数据达到预设条件时, 根据预设的 路由配置找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的 数据库进行操作。
进一步地, 所述数据缓冲层, 用于计算所述长关系链用户的最小操作单元, 将所述操 作请求路由到所述业务层的所述最小操作单元中。
进一步地, 所述业务层包括接收进程和入库进程;
所述业务层中的接收进程, 用于接收所述数据缓冲层推送过来的所述操作请求, 并将 所述操作请求缓存到所述最小操作单元中;
所述业务层中的入库进程, 用于读取所述最小操作单元, 以获取所述最小操作单元中 的所述操作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述 最小存储单元中。
进一步地, 所述业务层中的接收进程, 还用于对所述最小操作单元的同步序号累计加 一, 其中, 所述同步序号用于标识所述接收进程与所述数据缓冲层的同步进度。
进一步地, 所述业务层中的入库进程, 用于所述入库进程读取所述接收进程中所述最 小操作单元的同步序号, 判断所述最小操作单元的同步序号是否大于本地保存的所述最小 操作单元的读取序号, 如果是, 则读取所述最小操作单元中的所述操作请求, 其中, 所述 读取序号用于标识所述入库进程与所述接收进程的同步进度。
本发明实施例提供的技术方案带来的有益效果是: 数据缓冲层接收客户端的长关系链 用户的听众的操作请求, 并将所述操作请求推送到业务层; 所述业务层接收所述数据缓冲 层推送过来的操作请求, 将所述操作请求按照最小存储单元进行缓存; 当所述最小存储单 元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置找到属于所述长关系链 用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进行操作。 通过以长关系 链用户为单元划分最小存储单元, 使得业务层在接收到数据缓冲层推送过来的听众的操作 请求时, 业务层能够按照最小存储单元存储操作请求, 实现对底层数据库的批量操作, 减 轻了数据的操作负担, 提高了对长关系链用户听众信息的处理速度。 附图说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所需要使用的 附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本 领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的 附图。
图 1是本发明实施例一提供的一种数据处理的系统示意图;
图 2是本发明实施例一提供的另一种数据处理的系统示意图;
图 3是本发明实施例二提供的一种数据处理的方法流程图;
图 4是本发明实施例三提供的一种数据处理的方法流程图;
图 5是本发明实施例四提供的一种终端的结构示意图。 具体实施方式
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施方式作 进一步地详细描述。
实施例一
参见图 1, 本实施例中提供了一种数据处理的系统, 所述系统包括: 数据缓冲层 101和 业务层 102;
所述数据缓冲层 101, 用于接收客户端的长关系链用户的听众的操作请求, 并将所述操 作请求推送到所述业务层 102;
所述业务层 102, 用于接收所述数据缓冲层 101推送过来的所述操作请求, 将所述操作 请求按照最小存储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位 进行划分的;
所述业务层 102, 还用于当所述最小存储单元中缓存的数据达到预设条件时, 根据预设 的路由配置找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定 的数据库进行操作。
其中, 所述数据缓冲层 101, 用于计算所述长关系链用户的最小操作单元, 将所述操作 请求路由到业务层 102的所述最小操作单元中。
参见图 2, 本实施例中, 所述业务层 102进一步包括接收进程 102a和入库进程 102b; 相应地, 所述业务层 102中的接收进程 102a, 用于接收所述数据缓冲层 101推送过来 的所述操作请求, 并将所述操作请求缓存到所述最小操作单元中;
所述业务层 102中的入库进程 102b, 用于读取所述最小操作单元, 以获取所述最小操 作单元中的所述操作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓 存到所述最小存储单元中。
进一步地, 所述业务层 102中的接收进程 102a, 还用于对所述最小操作单元的同步序 号累计加一, 其中, 所述同步序号用于标识所述接收进程 102a与所述数据缓冲层 101的同 步进度。
其中, 所述业务层 102中的入库进程 102b, 用于读取所述接收进程 102a中所述最小操 作单元的同步序号, 判断所述最小操作单元的同步序号是否大于本地保存的所述最小操作 单元的读取序号, 如果是, 则读取所述最小操作单元中的所述操作请求, 其中, 所述读取 序号用于标识所述入库进程 102b与所述接收进程 102a的同步进度。
本实施例的有益效果是: 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业务层; 所述业务层接收所述数据缓冲层推送过来的操作请求, 将所述操作请求按照最小存储单元进行缓存; 当所述最小存储单元中缓存的数据达到预设 条件时, 所述业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库, 并 按照所述操作请求对所述指定的数据库进行操作。 通过以长关系链用户为单元划分最小存 储单元, 使得业务层在接收到数据缓冲层推送过来的听众的操作请求时, 业务层能够按照 最小存储单元存储操作请求, 实现对底层数据库的批量操作, 减轻了数据的操作负担, 提 高了对长关系链用户听众信息的处理速度。 实施例二
参见图 3, 基于实施例一中的数据处理的系统, 本实施例提供了一种数据处理的方法, 包括:
201、 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推 送到业务层;
202、 所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照 最小存储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分 的;
203、 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由 配置找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据 库进行操作。
其中, 所述将所述操作请求推送到业务层, 包括但不限于:
数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到业务层的 所述最小操作单元中。
其中, 所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按 照最小存储单元进行缓存, 包括但不限于: 所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操 作请求缓存到所述最小操作单元中;
所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述 操作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小存 储单元中。
本实施例中, 所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操作请求的日志缓存到所述最小操作单元中之后, 还包括:
所述接收进程对所述最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标 识所述接收进程与所述数据缓冲层的同步进度。
进一步地, 所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单 元中的所述操作请求, 包括但不限于:
所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作 单元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述 最小操作单元中的所述操作请求, 其中, 所述读取序号用于标识所述入库进程与所述接收 进程的同步进度。
本实施例的有益效果是: 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业务层; 所述业务层接收所述数据缓冲层推送过来的操作请求, 将所述操作请求按照所述最小存储单元进行缓存; 当所述最小存储单元中缓存的数据达到 预设条件时, 所述业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库, 并按照操作请求对所述指定的数据库进行操作。 通过以长关系链用户为单元划分最小存储 单元, 使得业务层在接收到数据缓冲层推送过来的听众的操作请求时, 业务层能够按照最 小存储单元存储操作请求, 实现对底层数据库的批量操作, 减轻了数据的操作负担, 提高 了对长关系链用户听众信息的处理速度。 实施例三
参见图 4, 基于实施例一中的数据处理的系统, 本发明实施例提供了一种数据处理的方 法, 方法流程包括:
301、 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推 送到业务层;
本步骤中, 所述数据缓冲层将所述操作请求推送到业务层, 包括但不限于:
数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到所述最小 操作单元中。
其中, 除了上述推送操作请求到业务层的方式外, 还可采取其他的推送方式, 对此本 实施例不做具体限定。
本实施例中, 业务层分为接收进程及入库进程, 且接收进程中的缓存划分成多个最小 操作单元; 其中, 最小操作单元为长关系链用户 Uin模 4999获得。 Uin包括用户的账号等, 对此本实施例不做具体限定。
在数据缓冲层接收客户端的长关系链用户的听众的操作请求后, 计算该长关系链用户 的最小操作单元, 其中, 具体计算方法就是用该长关系链用户 Uin模 4999。 根据该长关系 链用户的最小操作单元来路由操作请求到业务层。 其中, 长关系链用户的听众的操作请求 包括: 添加请求, 删除请求, 转发消息请求或是对消息进行评论请求等, 对此本实施例不 做具体限定。
302、 所述业务层中的接收进程接收所述数据缓冲层推送过来的操作请求, 并将所述操 作请求缓存到最小操作单元中;
此步骤中, 接收进程根据数据缓冲层的路由目的地址, 将接收到的操作请求缓存到最 小操作单元中。 其中, 操作请求用于记录长关系链用户的听众操作信息。 例如, 记录长关 系链用户 X添加听众 a; 记录长关系链用户 y添加听众 b; 记录长关系链用户 X删除听众 c 等。 本实施例中, 接收进程对缓存中的每个最小操作单元都保存一个同步序号, 该同步序 号用于标识所述接收进程与所述数据缓冲层的同步进度。 在接收进程接收到一个操作请求 后, 会对缓存该操作请求的最小操作单元的同步序号累计加一。 例如, 接收进程中有多个 最小操作单元, 将接收到的用户的操作请求保存到了第三个最小操作单元, 则在第三个最 小操作单元保存该操作请求后, 将第三个最小操作单元的同步序号累计加一。 此步骤中, 将用户的操作请求保存到最小操作单元中后, 对该最小操作单元的同步序号累计加一。 如, 原来的同步序号为 5, 则累计加一后为 6。
303、 所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的 所述操作请求;
本实施例中, 相对应接收进程为每个最小操作单元保存的同步序号, 入库进程为每个 最小操作单元保存相应的读取序号, 该读取序号用于标识入库进程与接收进程的同步进度, 即入库进程读取到的每个最小操作单元中的操作请求与接收进程的同步进度。 入库进程通 过比较读取序号和同步序号来判断某个最小操作单元中是否有新的同步操作请求, 以便能 够及时读取到新的操作请求。 本步骤中, 所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单 元中的操作请求, 具体包括:
所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作 单元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述 最小操作单元中的操作请求。
304、 所述入库进程计算所述操作请求所属的最小存储单元, 将所述操作请求按照所述 最小存储单元进行缓存;
本实施例中, 以长关系链用户为单位重新划分最小的数据存储单元, 使一个长关系链 用户对应一个数据库, 这样入库进程在进行数据处理时, 只需要对某个最小操作单元进行 操作, 而不需要对所有的长关系链用户的数据进行操作, 从而减轻了数据操作的负担。
值得说明的是, 对于当某个长关系链用户的听众超过预设的数量时, 可以进一步将该 长关系链用户的听众信息进一步划分, 使一个最小操作单元只包含该长关系链用户的部分 听众信息。 其中预设的数量可以根据经验值预先设定好, 也可以依据系统当前的运行效率 而进行调整, 对此本实施例不做具体限定。
本实施例中, 入库进程计算所述操作请求所属的最小存储单元, 包括但不限于: 根据 长关系链用户 Uin、听众 Uin及配置的该长关系链用户的最小存储单元的个数, 得到所述操 作请求所属的最小存储单元。 具体表示形式为: 长关系链用户 Uin—粉丝 Uin %配置的最小 存储单元的个数, 例如, 配置长关系链用户的 Uin为 12345678, 为其配置了 9个最小存储 单元, 则配置的最小存储单元依次为: 12345678—0、 12345678—1、 . . .、 12345678—8。
此步骤中, 在计算得到操作请求所属的最小存储单元后, 将该操作请求按照该最小存 储单元进行缓存, 即将该操作请求缓存到最小存储单元中。
其中, 步骤 302-304 为所述业务层接收所述数据缓冲层推送过来的操作请求, 将所述 操作请求按照所述最小存储单元进行缓存的具体操作过程。
305、 入库进程判断最小存储单元中缓存的数据是否达到预设的条件, 如果是则执行步 骤 306, 否则返回步骤 303执行;
本实施例中, 入库进程定时地扫描每个最小存储单元, 当检测到某个最小存储单元达 到入库条件时, 将该最小存储单元中的操作数据路由到相应的数据库中进行保存。 本步骤 中, 当入库进程扫描到步骤 304 中的最小存储单元时, 判断该最小存储单元中缓存的数据 是否达到预设的条件, 如果是, 则执行对该最小存储单元中的数据的入库操作。
其中, 预设的条件, 即入库条件可以根据经验值预先设定, 也可以根据系统当前的运 行情况实时进行调整, 对此本实施例不做具体限定。 306、 业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库, 并按照 所述操作请求对所述指定的数据库进行操作。
本实施例中, 设置多个数据库, 并根据长关系链用户 Uin模 4999的规则预先进行路由 配置, 业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库, 并按照所 述操作请求对所述指定的数据库进行操作。 例如, 操作请求为添加好友请求, 则在数据库 中进行数据添加的操作, 操作请求为删除请求, 则在数据库中进行数据删除的操作。
本实施例的有益效果是: 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业务层; 所述业务层接收所述数据缓冲层推送过来的操作请求, 将所述操作请求按照最小存储单元进行缓存; 当所述最小存储单元中缓存的数据达到预设 条件时, 所述业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库, 并 按照所述操作请求对所述指定的数据库进行操作。 通过以长关系链用户为单元划分最小存 储单元, 使得业务层在接收到数据缓冲层推送过来的听众的操作请求时, 业务层能够按照 最小存储单元存储操作请求, 实现对底层数据库的批量操作, 减轻了数据的操作负担, 提 高了对长关系链用户听众信息的处理速度。 且通过数据库的路由配置, 将操作请求保存到 不同的数据库中, 使得用户听众息从数据库级分离出来, 进一步减轻了服务器的操作负担, 提高了系统的性能。 且, 在业务层的接收进程中也按照最小操作单元为单位进行缓存, 进 一步减少业务层的操作负担, 提高数据的处理速度。 实施例四
参见图 5, 本发明实施例提供了一种终端的结构示意图, 其示出了本发明实施例所涉及 的具有触敏表面的结构示意图, 该终端可以用于实施上述实施例中提供的数据处理的方法。 具体来讲:
终端 500可以包括 RF ( Radio Frequency, 射频) 电路 110、 包括有一个或一个以上计 算机可读存储介质的存储器 120、输入单元 130、显示单元 140、传感器 150、音频电路 160、 传输模块 170、 包括有一个或者一个以上处理核心的处理器 180、 以及电源 190等部件。 本 领域技术人员可以理解, 图 5 中示出的终端结构并不构成对终端的限定, 可以包括比图示 更多或更少的部件, 或者组合某些部件, 或者不同的部件布置。 其中:
RF电路 110可用于收发信息或通话过程中, 信号的接收和发送, 特别地, 将基站的下 行信息接收后, 交由一个或者一个以上处理器 180 处理; 另外, 将涉及上行的数据发送给 基站。 通常, RF电路 110包括但不限于天线、 至少一个放大器、 调谐器、 一个或多个振荡 器、 用户身份模块 (SIM) 卡、 收发信机、 耦合器、 LNA ( Low Noi se Ampl ifier, 低噪声放 大器)、 双工器等。 此外, RF电路 110还可以通过无线通信与网络和其他设备通信。 所述无 线通信可以使用任一通信标准或协议, 包括但不限于 GSM (Global System of Mobi le communication, 全球移动通讯系统)、 GPRS (General Packet Radio Service, 通用分组无 线服务) CDMA (Code Division Multiple Access ,码分多址) WCDMA (Wideband Code Division Multiple Access, 宽带码分多址)、 LTE (Long Term Evolution,长期演进)、 电子邮件、 SMS (Short Messaging Service, 短消息服务)等。
存储器 120 可用于存储软件程序以及模块, 如实施例三中提高应用程序运行速度的装 置所对应的软件程序以及模块, 处理器 180通过运行存储在存储器 120的软件程序以及模 块, 从而执行各种功能应用以及数据处理, 如实现应用程序运行速度的提高等。 存储器 120 可主要包括存储程序区和存储数据区, 其中, 存储程序区可存储操作系统、 至少一个功能 所需的应用程序 (比如声音播放功能、 图像播放功能等) 等; 存储数据区可存储根据终端
500的使用所创建的数据 (比如音频数据、 电话本等)等。 此外, 存储器 120可以包括高速 随机存取存储器, 还可以包括非易失性存储器, 例如至少一个磁盘存储器件、 闪存器件、 或其他易失性固态存储器件。 相应地, 存储器 120还可以包括存储器控制器, 以提供处理 器 180和输入单元 130对存储器 120的访问。
输入单元 130 可用于接收输入的数字或字符信息, 以及产生与用户设置以及功能控制 有关的键盘、 鼠标、 操作杆、 光学或者轨迹球信号输入。 具体地, 输入单元 130 可包括触 敏表面 131以及其他输入设备 132。 触敏表面 131, 也称为触摸显示屏或者触控板, 可收集 用户在其上或附近的触摸操作 (比如用户使用手指、 触笔等任何适合的物体或附件在触敏 表面 131上或在触敏表面 131附近的操作), 并根据预先设定的程式驱动相应的连接装置。 可选的, 触敏表面 131 可包括触摸检测装置和触摸控制器两个部分。 其中, 触摸检测装置 检测用户的触摸方位, 并检测触摸操作带来的信号, 将信号传送给触摸控制器; 触摸控制 器从触摸检测装置上接收触摸信息, 并将它转换成触点坐标, 再送给处理器 180, 并能接收 处理器 180发来的命令并加以执行。 此外, 可以采用电阻式、 电容式、 红外线以及表面声 波等多种类型实现触敏表面 131。 除了触敏表面 131, 输入单元 130还可以包括其他输入设 备 132。 具体地, 其他输入设备 132可以包括但不限于物理键盘、 功能键(比如音量控制按 键、 开关按键等)、 轨迹球、 鼠标、 操作杆等中的一种或多种。
显示单元 140可用于显示由用户输入的信息或提供给用户的信息以及终端 500的各种 图形用户接口, 这些图形用户接口可以由图形、 文本、 图标、 视频和其任意组合来构成。 显示单元 140可包括显示面板 141, 可选的, 可以采用 LCD (Liquid Crystal Display, 液 晶显示器)、 0LED (Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面 板 141。 进一步的, 触敏表面 131可覆盖显示面板 141, 当触敏表面 131检测到在其上或附 近的触摸操作后, 传送给处理器 180以确定触摸事件的类型, 随后处理器 180根据触摸事 件的类型在显示面板 141上提供相应的视觉输出。 虽然在图 5中, 触敏表面 131与显示面 板 141 是作为两个独立的部件来实现输入和输入功能, 但是在某些实施例中, 可以将触敏 表面 131与显示面板 141集成而实现输入和输出功能。
终端 500还可包括至少一种传感器 150, 比如光传感器、 运动传感器以及其他传感器。 具体地, 光传感器可包括环境光传感器及接近传感器, 其中, 环境光传感器可根据环境光 线的明暗来调节显示面板 141 的亮度, 接近传感器可在终端 500移动到耳边时, 关闭显示 面板 141和 /或背光。 作为运动传感器的一种, 重力加速度传感器可检测各个方向上 (一般 为三轴) 加速度的大小, 静止时可检测出重力的大小及方向, 可用于识别手机姿态的应用
(比如横竖屏切换、 相关游戏、磁力计姿态校准)、 振动识别相关功能(比如计步器、 敲击) 等; 至于终端 500还可配置的陀螺仪、 气压计、 湿度计、 温度计、 红外线传感器等其他传 感器, 在此不再赘述。
音频电路 160、 扬声器 161, 传声器 162可提供用户与终端 500之间的音频接口。 音频 电路 160可将接收到的音频数据转换后的电信号, 传输到扬声器 161, 由扬声器 161转换为 声音信号输出; 另一方面, 传声器 162 将收集的声音信号转换为电信号, 由音频电路 160 接收后转换为音频数据, 再将音频数据输出处理器 180处理后, 经 RF电路 110以发送给比 如另一终端, 或者将音频数据输出至存储器 120以便进一步处理。 音频电路 160还可能包 括耳塞插孔, 以提供外设耳机与终端 500的通信。
终端 500通过传输模块 170可以帮助用户收发电子邮件、 浏览网页和访问流式媒体等, 它为用户提供了无线或有线的宽带互联网访问。虽然图 5示出了传输模块 170, 但是可以理 解的是, 其并不属于终端 500 的必须构成, 完全可以根据需要在不改变发明的本质的范围 内而省略。
处理器 180是终端 500的控制中心, 利用各种接口和线路连接整个手机的各个部分, 通过运行或执行存储在存储器 120内的软件程序和 /或模块, 以及调用存储在存储器 120内 的数据, 执行终端 500 的各种功能和处理数据, 从而对手机进行整体监控。 可选的, 处理 器 180可包括一个或多个处理核心; 优选的, 处理器 180可集成应用处理器和调制解调处 理器, 其中, 应用处理器主要处理操作系统、 用户界面和应用程序等, 调制解调处理器主 要处理无线通信。 可以理解的是, 上述调制解调处理器也可以不集成到处理器 180中。
终端 500还包括给各个部件供电的电源 190 (比如电池), 优选的, 电源可以通过电源 管理系统与处理器 180逻辑相连, 从而通过电源管理系统实现管理充电、 放电、 以及功耗 管理等功能。 电源 190还可以包括一个或一个以上的直流或交流电源、 再充电系统、 电源 故障检测电路、 电源转换器或者逆变器、 电源状态指示器等任意组件。
尽管未示出, 终端 500还可以包括摄像头、 蓝牙模块等, 在此不再赘述。 具体在本实 施例中, 终端的显示单元是触摸屏显示器, 终端还包括有存储器, 以及一个或者一个以上 的程序, 其中一个或者一个以上程序存储于存储器中, 且经配置以由一个或者一个以上处 理器执行述一个或者一个以上程序包含用于进行以下操作的指令:
数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到 业务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小 存储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的; 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置 找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进 行操作。
假设上述为第一种可能的实施方式, 则在第一种可能的实施方式作为基础而提供的第 二种可能的实施方式中, 所述终端的存储器中, 还包含用于执行以下操作的指令:
数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到所述业务 层的所述最小操作单元中。
在第二种可能的实施方式作为基础而提供的第三种可能的实施方式中, 所述终端的存 储器中, 还包含用于执行以下操作的指令:
所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操 作请求缓存到所述最小操作单元中;
所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述 操作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小存 储单元中。
在第三种可能的实施方式作为基础而提供的第四种可能的实施方式中, 所述终端的存 储器中, 还包含用于执行以下操作的指令:
所述接收进程对所述最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标 识所述接收进程与所述数据缓冲层的同步进度。
在第四种可能的实施方式作为基础而提供的第五种可能的实施方式中, 所述终端的存 储器中, 还包含用于执行以下操作的指令:
所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作 单元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述 最小操作单元中的所述操作请求, 其中, 所述读取序号用于标识所述入库进程与所述接收 进程的同步进度。
综上所述, 本实施例的有益效果是: 数据缓冲层接收客户端的长关系链用户的听众的 操作请求, 并将所述操作请求推送到业务层; 所述业务层接收所述数据缓冲层推送过来的 操作请求, 将所述操作请求按照最小存储单元进行缓存; 当所述最小存储单元中缓存的数 据达到预设条件时, 所述业务层根据预设的路由配置找到属于所述长关系链用户的指定的 数据库, 并按照所述操作请求对所述指定的数据库进行操作。 通过以长关系链用户为单元 划分最小存储单元, 使得业务层在接收到数据缓冲层推送过来的听众的操作请求时, 业务 层能够按照最小存储单元存储操作请求, 实现对底层数据库的批量操作, 减轻了数据的操 作负担, 提高了对长关系链用户听众信息的处理速度。 且通过数据库的路由配置, 将操作 请求保存到不同的数据库中, 使得用户听众息从数据库级分离出来, 进一步减轻了服务器 的操作负担, 提高了系统的性能。 且, 在业务层的接收进程中也按照最小操作单元为单位 进行缓存, 进一步减少业务层的操作负担, 提高数据的处理速度。 实施例五
本发明实施例提供了一种计算机可读存储介质, 该计算机可读存储介质可以是上述实 施例中的存储器中所包含的计算机可读存储介质; 也可以是单独存在, 未装配入终端中的 计算机可读存储介质。 所述计算机可读存储介质存储有一个或者一个以上程序, 所述一个 或者一个以上程序被一个或者一个以上的处理器用来执行一个数据处理的方法, 所述方法 包括:
数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到 业务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小 存储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的; 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置 找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进 行操作。
假设上述为第一种可能的实施方式, 则在第一种可能的实施方式作为基础而提供的第 二种可能的实施方式中, 所述将所述操作请求推送到业务层, 包括:
数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到所述业务 层的所述最小操作单元中。
在第二种可能的实施方式作为基础而提供的第三种可能的实施方式中, 所述业务层接 收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小存储单元进行缓存, 包括:
所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操 作请求缓存到所述最小操作单元中;
所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述 操作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小存 储单元中。
在第三种可能的实施方式作为基础而提供的第四种可能的实施方式中, 所述业务层中 的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操作请求的日志缓存 到所述最小操作单元中之后, 还包括:
所述接收进程对所述最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标 识所述接收进程与所述数据缓冲层的同步进度。
在第四种可能的实施方式作为基础而提供的第五种可能的实施方式中, 所述业务层中 的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述操作请求, 包括: 所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作 单元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述 最小操作单元中的所述操作请求, 其中, 所述读取序号用于标识所述入库进程与所述接收 进程的同步进度。
本实施例的有益效果是: 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业务层; 所述业务层接收所述数据缓冲层推送过来的操作请求, 将所述操作请求按照最小存储单元进行缓存; 当所述最小存储单元中缓存的数据达到预设 条件时, 所述业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库, 并 按照所述操作请求对所述指定的数据库进行操作。 通过以长关系链用户为单元划分最小存 储单元, 使得业务层在接收到数据缓冲层推送过来的听众的操作请求时, 业务层能够按照 最小存储单元存储操作请求, 实现对底层数据库的批量操作, 减轻了数据的操作负担, 提 高了对长关系链用户听众信息的处理速度。 且通过数据库的路由配置, 将操作请求保存到 不同的数据库中, 使得用户听众息从数据库级分离出来, 进一步减轻了服务器的操作负担, 提高了系统的性能。 且, 在业务层的接收进程中也按照最小操作单元为单位进行缓存, 进 一步减少业务层的操作负担, 提高数据的处理速度。 实施例六
本发明实施例中提供了一种图形用户接口, 所述图形用户接口用在终端上, 所述终端 包括触摸屏显示器、 存储器和用于执行一个或者一个以上的程序的一个或者一个以上的处 理器; 所述图形用户接口包括:
在所述触摸屏显示器上数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并 将所述操作请求推送到业务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小 存储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的; 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置 找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进 行操作。
本实施例的有益效果是: 数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业务层; 所述业务层接收所述数据缓冲层推送过来的操作请求, 将所述操作请求按照最小存储单元进行缓存; 当所述最小存储单元中缓存的数据达到预设 条件时, 所述业务层根据预设的路由配置找到属于所述长关系链用户的指定的数据库, 并 按照所述操作请求对所述指定的数据库进行操作。 通过以长关系链用户为单元划分最小存 储单元, 使得业务层在接收到数据缓冲层推送过来的听众的操作请求时, 业务层能够按照 最小存储单元存储操作请求, 实现对底层数据库的批量操作, 减轻了数据的操作负担, 提 高了对长关系链用户听众信息的处理速度。 且通过数据库的路由配置, 将操作请求保存到 不同的数据库中, 使得用户听众息从数据库级分离出来, 进一步减轻了服务器的操作负担, 提高了系统的性能。 且, 在业务层的接收进程中也按照最小操作单元为单位进行缓存, 进 一步减少业务层的操作负担, 提高数据的处理速度。 需要说明的是: 上述实施例中提供的数据处理的系统, 仅以上述各功能模块的划分进 行举例说明, 实际应用中, 可以根据需要而将上述功能分配由不同的功能模块完成, 即将 系统的内部结构划分成不同的功能模块, 以完成以上描述的全部或者部分功能。
另外, 上述实施例提供的数据处理的系统与数据处理的方法实施例属于同一构思, 其 具体实现过程详见方法实施例, 这里不再赘述。
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完 成, 也可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一种计算机可读存储 介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的精神和原则 之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1、 一种数据处理的方法, 其特征在于, 所述方法包括:
数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业 务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小存 储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的;
当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置找 到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进行操 作。
2、根据权利要求 1所述的方法,其特征在于,所述将所述操作请求推送到业务层,包括: 数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到所述业务层 的所述最小操作单元中。
3、根据权利要求 2所述的方法, 其特征在于, 所述业务层接收所述数据缓冲层推送过来 的所述操作请求, 将所述操作请求按照最小存储单元进行缓存, 包括:
所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操作 请求的日志缓存到所述最小操作单元中;
所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述操 作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小存储单 元中。
4、根据权利要求 3所述的方法, 其特征在于, 所述业务层中的接收进程接收所述数据缓 冲层推送过来的所述操作请求, 并将所述操作请求的日志缓存到所述最小操作单元中之后, 还包括:
所述接收进程对所述最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标识 所述接收进程与所述数据缓冲层的同步进度。
5、根据权利要求 4所述的方法, 其特征在于, 所述业务层中的入库进程读取所述最小操 作单元, 以获取所述最小操作单元中的所述操作请求, 包括: 所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作单 元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述最小 操作单元中的所述操作请求, 其中, 所述读取序号用于标识所述入库进程与所述接收进程的 同步进度。
6、 一种数据处理的系统, 其特征在于, 所述系统包括: 数据缓冲层和业务层; 所述数据缓冲层, 用于接收客户端的长关系链用户的听众的操作请求, 并将所述操作请 求推送到所述业务层;
所述业务层, 用于接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照 最小存储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的; 所述业务层, 还用于当所述最小存储单元中缓存的数据达到预设条件时, 根据预设的路 由配置找到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据 库进行操作。
7、 根据权利要求 6所述的系统, 其特征在于, 所述数据缓冲层, 用于计算所述长关系链 用户的最小操作单元, 将所述操作请求路由到所述业务层的所述最小操作单元中。
8、 根据权利要求 7所述的系统, 其特征在于, 所述业务层包括接收进程和入库进程; 所述业务层中的接收进程, 用于接收所述数据缓冲层推送过来的所述操作请求, 并将所 述操作请求的日志缓存到所述最小操作单元中;
所述业务层中的入库进程, 用于读取所述最小操作单元, 以获取所述最小操作单元中的 所述操作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小 存储单元中。
9、 根据权利要求 8所述的系统, 其特征在于, 所述业务层中的接收进程, 还用于对所述 最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标识所述接收进程与所述数据 缓冲层的同步进度。
10、 根据权利要求 9所述的系统, 其特征在于, 所述业务层中的入库进程, 用于读取所 述接收进程中所述最小操作单元的同步序号, 判断所述最小操作单元的同步序号是否大于本 地保存的所述最小操作单元的读取序号, 如果是, 则读取所述最小操作单元中的所述操作请 求, 其中, 所述读取序号用于标识所述入库进程与所述接收进程的同步进度。
11、 一种终端, 其特征在于, 所述终端包括: 触摸屏显示器、 一个或者一个以上的处理 器; 存储器; 以及一个或者一个以上的程序, 其中所述一个或者一个以上程序存储于所述存 储器中, 且经配置以由所述一个或者一个以上处理器执行, 所述一个或者一个以上程序包含 用于进行以下操作的指令:
数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业 务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小存 储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的; 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置找 到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进行操 作。
12、 根据权利要求 11所述的终端, 其特征在于, 包含用于执行以下操作的指令: 数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到所述业务层 的所述最小操作单元中。
13、 根据权利要求 12所述的终端, 其特征在于, 包含用于执行以下操作的指令: 所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操作 请求的日志缓存到所述最小操作单元中;
所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述操 作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小存储单 元中。
14、 根据权利要求 13所述的终端, 其特征在于, 包含用于执行以下操作的指令: 所述接收进程对所述最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标识 所述接收进程与所述数据缓冲层的同步进度。
15、 根据权利要求 14所述的终端, 其特征在于, 包含用于执行以下操作的指令: 所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作单 元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述最小 操作单元中的所述操作请求, 其中, 所述读取序号用于标识所述入库进程与所述接收进程的 同步进度。
16、 一种计算机可读存储介质, 其特征在于, 所述计算机可读存储介质存储有一个或者 一个以上程序, 所述一个或者一个以上程序被一个或者一个以上的处理器用来执行一个数据 处理的方法, 所述方法包括:
数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将所述操作请求推送到业 务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小存 储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的; 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置找 到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进行操 作。
17、根据权利要求 16所述的计算机可读存储介质, 其特征在于, 所述将所述操作请求推 送到业务层, 包括:
数据缓冲层计算所述长关系链用户的最小操作单元, 将所述操作请求路由到所述业务层 的所述最小操作单元中。
18、根据权利要求 17所述的计算机可读存储介质, 所述业务层接收所述数据缓冲层推送 过来的所述操作请求, 将所述操作请求按照最小存储单元进行缓存, 包括:
所述业务层中的接收进程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操作 请求的日志缓存到所述最小操作单元中;
所述业务层中的入库进程读取所述最小操作单元, 以获取所述最小操作单元中的所述操 作请求, 并计算所述操作请求所属的最小存储单元, 将所述操作请求缓存到所述最小存储单
19、根据权利要求 17所述的计算机可读存储介质, 其特征在于, 所述业务层中的接收进 程接收所述数据缓冲层推送过来的所述操作请求, 并将所述操作请求的日志缓存到所述最小 操作单元中之后, 还包括: 所述接收进程对所述最小操作单元的同步序号累计加一, 其中, 所述同步序号用于标识 所述接收进程与所述数据缓冲层的同步进度。
20、根据权利要求 19所述的计算机可读存储介质, 其特征在于, 所述业务层中的入库进 程读取所述最小操作单元, 以获取所述最小操作单元中的所述操作请求, 包括:
所述入库进程读取所述接收进程中所述最小操作单元的同步序号, 判断所述最小操作单 元的同步序号是否大于本地保存的所述最小操作单元的读取序号, 如果是, 则读取所述最小 操作单元中的所述操作请求, 其中, 所述读取序号用于标识所述入库进程与所述接收进程的 同步进度。
21、 一种图形用户接口, 其特征在于, 所述图形用户接口用在终端上, 所述终端包括触 摸屏显示器、 存储器和用于执行一个或者一个以上的程序的一个或者一个以上的处理器; 所 述图形用户接口包括:
在所述触摸屏显示器上数据缓冲层接收客户端的长关系链用户的听众的操作请求, 并将 所述操作请求推送到业务层;
所述业务层接收所述数据缓冲层推送过来的所述操作请求, 将所述操作请求按照最小存 储单元进行缓存, 其中, 所述最小存储单元是以所述长关系链用户为单位进行划分的; 当所述最小存储单元中缓存的数据达到预设条件时, 所述业务层根据预设的路由配置找 到属于所述长关系链用户的指定的数据库, 并按照所述操作请求对所述指定的数据库进行操 作。
PCT/CN2013/086090 2012-10-29 2013-10-28 数据处理的方法和系统 WO2014067437A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/439,580 US9357027B2 (en) 2012-10-29 2013-10-28 Data processing method and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210420674.8A CN103793386B (zh) 2012-10-29 2012-10-29 数据处理的方法和系统
CN201210420674.8 2012-10-29

Publications (1)

Publication Number Publication Date
WO2014067437A1 true WO2014067437A1 (zh) 2014-05-08

Family

ID=50626484

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/086090 WO2014067437A1 (zh) 2012-10-29 2013-10-28 数据处理的方法和系统

Country Status (3)

Country Link
US (1) US9357027B2 (zh)
CN (1) CN103793386B (zh)
WO (1) WO2014067437A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9864785B2 (en) * 2016-10-24 2018-01-09 Interntaional Business Machines Corporation Processing a query via a lambda application

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030218A (zh) * 2007-03-23 2007-09-05 北京中星微电子有限公司 一种虚拟文件管理单元以及文件管理的系统和方法
WO2012085921A1 (en) * 2010-12-20 2012-06-28 Hewlett-Packard Development Company L.P. Method of provisioning additional storage to computer applications
CN102650931A (zh) * 2012-04-01 2012-08-29 华为技术有限公司 一种写入数据的方法及系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143021B1 (en) * 2000-10-03 2006-11-28 Cadence Design Systems, Inc. Systems and methods for efficiently simulating analog behavior of designs having hierarchical structure
US8788492B2 (en) * 2004-03-15 2014-07-22 Yahoo!, Inc. Search system and methods with integration of user annotations from a trust network
US20080005064A1 (en) * 2005-06-28 2008-01-03 Yahoo! Inc. Apparatus and method for content annotation and conditional annotation retrieval in a search context
US7761436B2 (en) * 2006-01-03 2010-07-20 Yahoo! Inc. Apparatus and method for controlling content access based on shared annotations for annotated users in a folksonomy scheme
US20080215348A1 (en) * 2007-03-02 2008-09-04 Marc Guldimann System and methods for advertisement and event promotion
CA2761700C (en) * 2009-07-24 2014-12-02 Research In Motion Limited Method and apparatus for a touch-sensitive display
US20130211944A1 (en) * 2010-11-01 2013-08-15 Zulfiqar N. Momin System, method and computer program product for sharing a product/service and its associated purchase price between customers
US9495711B2 (en) * 2010-11-19 2016-11-15 Microsoft Technology Licensing, Llc Invite abuse prevention
US20130035982A1 (en) * 2011-08-04 2013-02-07 Pitney Bowes Inc. Method and system for creating targeted advertising utilizing social media activity
US9171326B2 (en) * 2012-09-26 2015-10-27 Wal-Mart Stores, Inc. System and method for making gift recommendations using social media data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030218A (zh) * 2007-03-23 2007-09-05 北京中星微电子有限公司 一种虚拟文件管理单元以及文件管理的系统和方法
WO2012085921A1 (en) * 2010-12-20 2012-06-28 Hewlett-Packard Development Company L.P. Method of provisioning additional storage to computer applications
CN102650931A (zh) * 2012-04-01 2012-08-29 华为技术有限公司 一种写入数据的方法及系统

Also Published As

Publication number Publication date
CN103793386B (zh) 2017-12-12
CN103793386A (zh) 2014-05-14
US9357027B2 (en) 2016-05-31
US20150296036A1 (en) 2015-10-15

Similar Documents

Publication Publication Date Title
US11057376B2 (en) Method, apparatus, and system for controlling intelligent device, and storage medium
WO2015090248A1 (zh) 服务器的过载保护方法及装置
WO2018177333A1 (zh) 镜像分发方法、镜像获取方法及装置
WO2016150270A1 (zh) 群组会话消息处理方法和装置
WO2017088377A1 (zh) 消息撤回方法和装置
WO2014032559A1 (zh) 下载文件的方法和装置
CN104980455B (zh) 一种基于云存储的多终端数据同步方法、装置和系统
WO2016116041A1 (zh) 一种信息推荐的管理方法、装置和系统
JP6430527B2 (ja) データ処理方法、データ処理システムおよびサーバ
WO2017096909A1 (zh) 建立数据连接的方法及装置
WO2017215661A1 (zh) 一种场景音效的控制方法、及电子设备
CN106708554A (zh) 程序运行方法及装置
TW201502986A (zh) 使用於瀏覽器網頁的應用程式訊息通知顯示方法、相關設備與系統
WO2014166263A1 (en) Communication method, system, server and client device for user-interactive system
CN104660769B (zh) 一种添加联系人信息的方法、装置和系统
WO2014166266A1 (en) File scanning method and system, client and server
WO2015081880A1 (zh) 集群业务属性处理的方法、装置和系统
CN108270839B (zh) 访问频率控制系统及方法
WO2018161788A1 (zh) 多媒体数据共享方法及装置
CN106254924A (zh) 一种多媒体数据的播放方法、系统及相关设备
WO2015024393A1 (zh) 发送短信的方法、装置及终端
CN105025064B (zh) 下载文件的方法、装置及系统
WO2014026581A1 (zh) 信息管理的方法、客户端及移动终端
US20140344423A1 (en) Method, apparatus and system for switching function mode
WO2017076279A1 (zh) 一种更新路由表项的方法、装置及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13851123

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 14439580

Country of ref document: US

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.09.2015)

122 Ep: pct application non-entry in european phase

Ref document number: 13851123

Country of ref document: EP

Kind code of ref document: A1