CN110674147A - Data processing method, device and computer readable storage medium - Google Patents

Data processing method, device and computer readable storage medium Download PDF

Info

Publication number
CN110674147A
CN110674147A CN201910804689.6A CN201910804689A CN110674147A CN 110674147 A CN110674147 A CN 110674147A CN 201910804689 A CN201910804689 A CN 201910804689A CN 110674147 A CN110674147 A CN 110674147A
Authority
CN
China
Prior art keywords
data
library
original
different
preset rules
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.)
Granted
Application number
CN201910804689.6A
Other languages
Chinese (zh)
Other versions
CN110674147B (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.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201910804689.6A priority Critical patent/CN110674147B/en
Publication of CN110674147A publication Critical patent/CN110674147A/en
Application granted granted Critical
Publication of CN110674147B publication Critical patent/CN110674147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Abstract

The invention provides a data processing method, a data processing device and a computer readable storage medium, wherein the method comprises the following steps: synchronizing the pre-stored original data in the original database to the calculation library, and according to different preset rules, processing the original data in the calculation library to obtain result data corresponding to different preset rules, synchronizing the result data corresponding to different preset rules to the reading library, so that the reading library can return result data corresponding to different service requirements to the application client, the addition of the calculation library between the original database and the reading library can decouple the original database and the reading library, eliminate the database locking mechanism, ensure the consistency of data, meanwhile, the original data is processed according to different preset rules to obtain different result data, the original data are processed according to the service requirements, so that the corresponding service accesses the corresponding data, the data reading efficiency is improved, and the user experience is further improved.

Description

Data processing method, device and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, and a computer-readable storage medium.
Background
In an existing data processing method, an original database is usually deployed in a server, and the original database is used for storing original data, such as data of products, methods, operations and maintenance, but the original database cannot be accessed by a client generally due to data security considerations, so a read library is often deployed in the server, data in the original database is synchronized to the read library, and the read library provides access for the client so that a user can read the original data from the read library.
However, there is a problem in setting a read library for a user to access, if other operations are performed on the original database in the process of synchronizing the data in the original database to the read library, the data may be inconsistent due to a locking mechanism of the database, and the amount of data contained in the original database is large, the amount of data synchronized to the read library is also large, so that when the user reads the original data in the read library through a client, the data reading efficiency is low, and the user experience is poor.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a data processing method, a data processing apparatus, and a computer-readable storage medium that overcome or at least partially solve the above problems.
In order to solve the above problems, an embodiment of the present invention discloses a data processing method, which is applied to a server in a data processing system, wherein the data processing system further includes an application client, an original database, a calculation library and a reading library are deployed in the server, the original database is in communication connection with the calculation library, the calculation library is in communication connection with the reading library, and the reading library is in communication connection with the application client, and the method includes:
synchronizing original data pre-stored in an original database to a computing library;
processing the original data in the computing base according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different service requirements of an application client;
and synchronizing the result data corresponding to the different preset rules to the reading library so that the reading library can return the result data corresponding to the different business requirements to the application client.
Optionally, the data processing system further includes an entry client, and the method further includes:
receiving an operation instruction of a client for original data in an original database;
and responding to the operation instruction, and modifying the original data in the original database.
Optionally, the synchronizing the raw data pre-stored in the raw database to the computation library includes:
the raw data in the raw database is periodically synchronized to the compute library.
Optionally, the method further comprises:
receiving different service data sent by an application client so that the original database stores the service data, wherein each service data in the different service data corresponds to at least one preset rule in different preset rules;
synchronizing raw data pre-stored in a raw database to a computation library, comprising:
synchronizing original data pre-stored in an original database and the service data to a computing base;
processing the original data in the calculation library according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different service requirements of the application client, and the method comprises the following steps:
processing the original data in a calculation base according to the service data and a preset rule corresponding to the service data to obtain the service data and result data corresponding to the preset rule, wherein the different preset rules are determined according to different service requirements of an application client.
Optionally, there are a plurality of the reading libraries, a plurality of the application clients, a corresponding relationship exists between each reading library and one application client, each application client corresponds to one service requirement, and the different preset rules are determined according to different service requirements of different application clients;
the synchronizing the result data corresponding to the different preset rules to the reading library so that the reading library can return the result data corresponding to different service requirements to the application client includes:
and synchronizing the result data corresponding to the different preset rules to the reading libraries corresponding to the different application clients, so that the reading libraries can respectively return the corresponding result data to the application clients.
The embodiment of the invention also discloses a data processing device, which is applied to a server in a data processing system, the data processing system also comprises an application client, an original database, a calculation library and a reading library are deployed in the server, the original database is in communication connection with the calculation library, the calculation library is in communication connection with the reading library, the reading library is in communication connection with the application client, and the device comprises:
the original data synchronization module is used for synchronizing original data pre-stored in an original database to a calculation library;
the processing module is used for processing the original data in the computing base according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different service requirements of an application client;
and the result data synchronization module is used for synchronizing the result data corresponding to the different preset rules to the reading library so that the reading library can return the result data corresponding to the different business requirements to the application client.
Optionally, the data processing system further includes an entry client, and the apparatus further includes:
the first receiving module is used for receiving an operation instruction of the client for original data in the original database;
and the response module is used for responding to the operation instruction and modifying the original data in the original database.
Optionally, the first synchronization module further includes:
and the first original data synchronization sub-module is used for periodically synchronizing the original data in the original database to the calculation library.
Optionally, the apparatus further comprises:
the second receiving module is used for receiving different service data sent by an application client so that the original database stores the service data, wherein each service data in the different service data corresponds to at least one preset rule in different preset rules;
the raw data synchronization module further comprises:
the second original data synchronization submodule is used for synchronizing original data pre-stored in an original database and the service data to a calculation base;
the processing module comprises:
and the processing submodule is used for processing the original data in the calculation library according to the service data and a preset rule corresponding to the service data to obtain the service data and result data corresponding to the preset rule, wherein the different preset rules are determined according to different service requirements of the application client.
Optionally, there are a plurality of the reading libraries, a plurality of the application clients, a corresponding relationship exists between each reading library and one application client, each application client corresponds to one service requirement, and the different preset rules are determined according to different service requirements of different application clients;
the result data synchronization module includes:
and the result data synchronization submodule is used for synchronizing the result data corresponding to the different preset rules to the reading libraries corresponding to different application clients so that the reading libraries can respectively return the corresponding result data to the application clients.
The embodiment of the invention also discloses a data processing device, which comprises:
one or more processors; and
one or more computer-readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform a data processing method according to any one of the embodiments of the invention.
The embodiment of the invention also discloses a computer readable storage medium, which stores a computer program to enable a processor to execute the data processing method according to the embodiment of the invention.
The embodiment of the invention has the following advantages:
in the data processing method provided by the embodiment of the invention, a server synchronizes original data pre-stored in an original database to a computing base, processes the original data in the computing base according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different business requirements of an application client, and finally synchronizes the result data corresponding to the different preset rules to a reading base so that the reading base can return the result data corresponding to the different business requirements to the application client. In the data processing method, the calculation library is added between the original database and the reading library, so that the original database and the reading library can be decoupled, a database locking mechanism is eliminated, the consistency of data is ensured, meanwhile, the original data is processed according to different preset rules to obtain different result data, namely, the original data is processed according to business requirements, so that corresponding businesses access the corresponding data, the data reading efficiency is improved, and the user experience is improved.
Drawings
FIG. 1 is a schematic networking diagram of a video network of the present invention;
FIG. 2 is a schematic diagram of a hardware architecture of a node server according to the present invention;
fig. 3 is a schematic diagram of a hardware structure of an access switch of the present invention;
fig. 4 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention;
FIG. 5 is a flow chart of steps of a data processing method according to an embodiment of the present invention;
FIG. 6 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating steps of a method for modifying raw data in a raw database according to an embodiment of the present invention;
FIG. 8 is a flow chart illustrating steps of another data processing method according to an embodiment of the present invention;
fig. 9 is a block diagram of a data processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network Technology (Network Technology)
Network technology innovation in video networking has improved the traditional Ethernet (Ethernet) to face the potentially huge first video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 1, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: server, exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, code board, memory, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node server, access exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, coding board, memory, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 2, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
as shown in fig. 3, the network interface module mainly includes a network interface module (a downlink network interface module 301 and an uplink network interface module 302), a switching engine module 303 and a CPU module 304;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the incoming data packet of the CPU module 304 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues and may include two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate control module 308 is configured by the CPU module 304, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion gateway
As shown in fig. 4, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MACSA of the ethernet coordination gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved label (R) Payload CRC
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.
In an existing data processing method, an original database is usually deployed in a server, and the original database is used for storing original data, such as data of products, methods, operations and maintenance, but the original database cannot be accessed by a client generally due to data security considerations, so a read library is often deployed in the server, data in the original database is synchronized to the read library, and the read library provides access for the client so that a user can read the original data from the read library.
However, when the reading library is directly connected with the original database, a problem exists when the reading library is used for a user to access, when data in the original database is synchronized into the reading database, if other operations (such as adding, modifying, deleting and the like) for the original data in the original database exist, the original database is in a locked state, so that the original data synchronized into the reading library is data before the operation, and the data in operation can not be synchronized immediately, so that the original data synchronized into the reading library is inconsistent with the original data in the original database after the operation; in addition, the amount of data contained in the original database is huge, the original data in the original database is directly synchronized to the reading database, data are not provided according to business requirements, the amount of data in the reading database is also huge, and when a user reads the original data in the reading database through a client, the data reading efficiency is low, and the user experience is poor. Therefore, it is necessary to eliminate the locking mechanism of the database under the condition of ensuring data security, maintain the consistency of the data read by the user, provide data according to the service requirement, and improve the data reading efficiency, thereby improving the user experience.
The data processing method provided by the embodiment of the invention can be applied to a video network, particularly can be applied to a server in a data processing system of the video network, the data processing system also comprises an application client, an original database, a calculation library and a reading library are deployed in the server, the original database is in communication connection with the calculation library, the calculation library is in communication connection with the reading library, and the reading library is in communication connection with the application client.
The application client side: the client can be a third-party application client used by a user, and the user interacts with the server through the application client so as to read the data in the reading library.
A primary database: a database storing a large amount of raw data.
A calculation library: database for storing raw data processed by server
Reading a library: a database storing the processed result data and providing the result data to the application client for reading.
Referring to fig. 5 and fig. 6, fig. 5 is a flowchart illustrating steps of a data processing method according to an embodiment of the present invention, and fig. 6 is a flowchart illustrating a flow diagram illustrating a data processing method according to an embodiment of the present invention, where the method is applied to a server in a data processing system, and the method may specifically include the following steps:
step S501, synchronizing the original data pre-stored in the original database to the calculation library.
In this embodiment, the original database stores various data, including various products, schemes, operation and maintenance data, and the data processing system may further include an entry client, the data in the original database may be pre-entered by the entry client and pre-stored in the original database, and the entry client may be operated by an operation or maintenance person.
In this embodiment, the server may further include a computation processing center, and the computation processing center may be configured to synchronize data and perform computation processing on the raw data in the computation library according to a preset rule. The computing processing center synchronizes the original data pre-stored in the original database to the computing base so that the computing base stores the original data. When synchronizing raw data to a computer library, a transmission control protocol may be used for data synchronization.
The Transmission Control Protocol (TCP) is a connection-oriented, reliable transport layer communication Protocol based on a byte stream. TCP is intended to accommodate layered protocol hierarchies that support multiple network applications.
In this embodiment, the synchronization of the raw data pre-stored in the raw database to the computing base by the computing processing center may be periodic, and the time period of the synchronization may be set to one hour, one day, one week, or the like, which is not limited in this embodiment.
In this embodiment, the periodic synchronization data can reduce the phenomenon of data inconsistency caused by the database lock manufacturing process.
Step S502, processing the original data in the calculation library according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different business requirements of the application client.
In this embodiment, the preset rule refers to an algorithm rule stored in the server in advance for performing calculation processing on the raw data in the calculation library, and may be, but is not limited to, a KMP algorithm, there may be a plurality of preset rules, and the preset rule is executed by a calculation processing center in the server, and the preset rule is usually determined according to different requirements of the application client.
Illustratively, the requirements provided by the application client are: the original data content accessed by different users has different depths, namely, the data access rights of different users are set. At this time, the preset rule of the server needs to process the original data into multiple data with different content depths, and establish a corresponding relationship between the multiple data with different content depths and different permissions, so that users with different permissions access data contents with different depths.
In this embodiment, the calculation processing center respectively executes different preset rules, and processes the original data in the calculation library into corresponding result data. In addition, the preset rules in the server can be added or deleted, and can also be temporarily selected to be forbidden when the calculation processing center calculates.
Step S503, synchronizing the result data corresponding to the different preset rules to the reading library, so that the reading library can return the result data corresponding to the different service requirements to the application client.
In this embodiment, the number of the reading library may be one, different result data in the reading library are divided into different storage locations, after the calculation processing center completes calculation processing on original data in the calculation library, the server synchronizes result data corresponding to different preset rules in the calculation library to different storage locations of the same reading library to distinguish the different result data, and when the application client reads the result data in the reading library, the application client can read corresponding result data according to service requirements, that is, the reading library can return the result data corresponding to different service requirements to the application client. Here, the synchronization can also be performed by using TCP protocol.
In this embodiment, a server synchronizes original data pre-stored in an original database to a computing library, processes the original data in the computing library according to different preset rules to obtain result data corresponding to the different preset rules, where the different preset rules are determined according to different service requirements of an application client, and finally synchronizes the result data corresponding to the different preset rules to a read library, so that the read library can return the result data corresponding to the different service requirements to the application client. In the data processing method, the calculation library is added between the original database and the reading library, so that the original database and the reading library can be decoupled, a database locking mechanism is eliminated, the consistency of data is ensured, meanwhile, the original data is processed according to different preset rules to obtain different result data, namely, the original data is processed according to business requirements, so that corresponding businesses access the corresponding data, the data reading efficiency is improved, and the user experience is improved.
Considering that various products, schemes or operation and maintenance data generated in production applications are continuously updated, the original data in the original database also needs to be continuously updated to meet the use requirements of different users, so that operation or maintenance personnel can operate the entry client to modify the original data, including but not limited to adding data, deleting data, changing data and the like. In view of the above, please refer to fig. 7, fig. 7 is a flowchart illustrating steps of a method for modifying original data in an original database according to an embodiment of the present invention.
As shown in fig. 6 and 7, the method includes the steps of:
step S701, receiving an operation instruction of the input client to the original data in the original database.
In this embodiment, an operation instruction of an operation or maintenance person on the input client for the original data in the original database may be regarded as an update operation of the maintenance person for the original data, and the update of the original data may include adding the original data, deleting the original data, or modifying the original data.
Step S702, modifying the original data in the original database in response to the operation instruction.
For example, a product is newly developed in production, an operation or maintenance worker can enter information such as a product name, a function, an attribute, a use instruction and the like of a new product through an entry client, use an addition function on the entry client, and then sequentially input new product information to complete operation, an operation generation instruction is sent to a server, and the server responds to the operation instruction and adds the entered new product information in an original database.
In some possible embodiments, step S503 may specifically be:
and synchronizing the result data corresponding to the different preset rules to the reading libraries corresponding to the different application clients, so that the reading libraries can respectively return the corresponding result data to the application clients.
In this embodiment, there may be a plurality of reading libraries, each reading library stores one result data, and there may be a plurality of application clients, each reading library has a corresponding relationship with one application client, each application client corresponds to one service requirement, and different preset rules are determined according to different service requirements of different application clients. In other words, each application client is connected with a corresponding reading library, and when the result data in the calculation library is synchronized to the reading library, the result data is synchronized with the corresponding preset rule according to the service requirement of the application client, so that the result data read from the reading library just meets the service requirement of the application client. That is, each reading library can just return result data corresponding to the corresponding service requirement to the application client connected with the reading library.
In this embodiment, the original data is processed according to different preset rules to obtain different result data, that is, the original data is processed according to the service requirement, so that the corresponding service accesses the corresponding data, the data reading efficiency is improved, and the user experience is improved.
Referring to fig. 8, fig. 8 is a flowchart illustrating steps of another data processing method provided in an embodiment of the present application, where the method specifically includes the following steps:
step S801, receiving different service data sent by an application client, so that the original database stores the service data, where each service data in the different service data corresponds to at least one preset rule in different preset rules.
In consideration of the fact that a computation processing center of a server needs to process business data sent by an application client when computing and processing some business requirements, that is, the computation processing is performed by combining original data, the business data and a preset rule, the business data sent by the application client needs to be received before the original data in a computation library is computed and processed.
Illustratively, one service requirement is specifically a search service, the preset rule is that original data is processed into an association relationship between common search content and a search result corresponding to the search content, after a computing processing center processes the original data in a computing base into result data, a user can obtain the corresponding search result by inputting the search content at an application client, but when the search content input by the user is not the common search content, the computing processing center does not process the non-common search content, so that the user cannot obtain the search result, and at the moment, the server can send the service data to the original database for storage by using a search word as the service data.
Step S802, synchronizing the original data pre-stored in the original database and the service data to a calculation base.
In this embodiment, since the service data is stored in the original database, the server synchronizes the original data pre-stored in the original database to the computing base and simultaneously synchronizes the service data to the computing base.
Step S803, according to the service data and a preset rule corresponding to the service data, processing the original data in a calculation library to obtain the service data and result data corresponding to the preset rule, where the different preset rules are determined according to different service requirements of the application client.
In this embodiment, the original data and the service data are stored in the calculation library, so that the result data corresponding to the service data and the preset rule can be obtained by performing calculation processing in combination with the original data, the service data and the preset rule.
Step S804, synchronizing the result data corresponding to the different preset rules to the reading library, so that the reading library can return the result data corresponding to the different service requirements to the application client.
This step is the same as step S503 and will not be described in detail here.
In the embodiment of the invention, the service data of the application client can be received, and the original data is calculated and processed by combining the service data, the original data and the preset rule, so that the data processing method provided by the embodiment of the invention can meet the service requirement of the application client and improve the user experience.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Based on the same technical concept, please refer to fig. 9, fig. 9 shows a data processing apparatus according to an embodiment of the present invention, where the apparatus is applied to a server in a data processing system, the data processing system further includes an application client, an original database, a computation library and a read library are deployed in the server, the original database is in communication connection with the computation library, the computation library is in communication connection with the read library, and the read library is in communication connection with the application client, and the apparatus may include the following modules:
an original data synchronization module 901, configured to synchronize original data pre-stored in an original database to a computing base;
a processing module 902, configured to process the original data in the computing library according to different preset rules to obtain result data corresponding to the different preset rules, where the different preset rules are determined according to different service requirements of an application client;
a result data synchronization module 903, configured to synchronize the result data corresponding to the different preset rules to the read library, so that the read library can return the result data corresponding to the different service requirements to the application client.
Optionally, the data processing system further includes an entry client, and the apparatus further includes:
the first receiving module is used for receiving an operation instruction of the client for original data in the original database;
and the response module is used for responding to the operation instruction and modifying the original data in the original database.
Optionally, the first synchronization module further includes:
and the first original data synchronization sub-module is used for periodically synchronizing the original data in the original database to the calculation library.
Optionally, the apparatus further comprises:
the second receiving module is used for receiving different service data sent by an application client so that the original database stores the service data, wherein each service data in the different service data corresponds to at least one preset rule in different preset rules;
the raw data synchronization module further comprises:
the second original data synchronization submodule is used for synchronizing original data pre-stored in an original database and the service data to a calculation base;
the processing module comprises:
and the processing submodule is used for processing the original data in the calculation library according to the service data and a preset rule corresponding to the service data to obtain the service data and result data corresponding to the preset rule, wherein the different preset rules are determined according to different service requirements of the application client.
Optionally, there are a plurality of the reading libraries, a plurality of the application clients, a corresponding relationship exists between each reading library and one application client, each application client corresponds to one service requirement, and the different preset rules are determined according to different service requirements of different application clients;
the result data synchronization module includes:
and the result data synchronization submodule is used for synchronizing the result data corresponding to the different preset rules to the reading libraries corresponding to different application clients so that the reading libraries can respectively return the corresponding result data to the application clients.
An embodiment of the present invention further provides a data processing apparatus, including:
one or more processors; and
one or more computer-readable media having instructions stored thereon which, when executed by the one or more processors, cause the apparatus to perform a data processing method according to any one of the embodiments of the invention.
Embodiments of the present invention further provide a computer-readable storage medium, which stores a computer program to enable a processor to execute the data processing method according to the embodiments of the present invention.
For the embodiment of the data processing device, since it is basically similar to the embodiment of the data processing method, the description is relatively simple, and for relevant points, reference may be made to part of the description of the embodiment of the data processing method.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The data processing method, the data processing apparatus and the computer-readable storage medium provided by the present invention are described in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the description of the above embodiments is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. A data processing method, applied to a server in a data processing system, wherein the data processing system further includes an application client, the server is deployed with an original database, a computation library and a read library, the original database is communicatively connected to the computation library, the computation library is communicatively connected to the read library, and the read library is communicatively connected to the application client, the method comprising:
synchronizing original data pre-stored in an original database to a computing library;
processing the original data in the computing base according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different service requirements of an application client;
and synchronizing the result data corresponding to the different preset rules to the reading library so that the reading library can return the result data corresponding to the different business requirements to the application client.
2. The method of claim 1, wherein the data processing system further comprises a logging client, the method further comprising:
receiving an operation instruction of a client for original data in an original database;
and responding to the operation instruction, and modifying the original data in the original database.
3. The method of claim 1, wherein synchronizing the pre-stored raw data in the raw database to the computational library comprises:
the raw data in the raw database is periodically synchronized to the compute library.
4. The method according to any one of claims 1-3, further comprising:
receiving different service data sent by an application client so that the original database stores the service data, wherein each service data in the different service data corresponds to at least one preset rule in different preset rules;
synchronizing raw data pre-stored in a raw database to a computation library, comprising:
synchronizing original data pre-stored in an original database and the service data to a computing base;
processing the original data in the calculation library according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different service requirements of the application client, and the method comprises the following steps:
processing the original data in a calculation base according to the service data and a preset rule corresponding to the service data to obtain the service data and result data corresponding to the preset rule, wherein the different preset rules are determined according to different service requirements of an application client.
5. The method according to claim 1, wherein there are a plurality of reading libraries, there are a plurality of application clients, there is a corresponding relationship between each reading library and one application client, each application client corresponds to one service requirement, and the different preset rules are determined according to different service requirements of different application clients;
the synchronizing the result data corresponding to the different preset rules to the reading library so that the reading library can return the result data corresponding to different service requirements to the application client includes:
and synchronizing the result data corresponding to the different preset rules to the reading libraries corresponding to the different application clients, so that the reading libraries can respectively return the corresponding result data to the application clients.
6. A data processing apparatus, wherein the apparatus is applied to a server in a data processing system, the data processing system further includes an application client, the server is disposed with a raw database, a computation library and a read library, the raw database is communicatively connected to the computation library, the computation library is communicatively connected to the read library, and the read library is communicatively connected to the application client, the apparatus includes:
the original data synchronization module is used for synchronizing original data pre-stored in an original database to a calculation library;
the processing module is used for processing the original data in the computing base according to different preset rules to obtain result data corresponding to the different preset rules, wherein the different preset rules are determined according to different service requirements of an application client;
and the result data synchronization module is used for synchronizing the result data corresponding to the different preset rules to the reading library so that the reading library can return the result data corresponding to the different business requirements to the application client.
7. The apparatus of claim 6, wherein the data processing system further comprises a logging client, the apparatus further comprising:
the first receiving module is used for receiving an operation instruction of the client for original data in the original database;
and the response module is used for responding to the operation instruction and modifying the original data in the original database.
8. The apparatus of claim 6, wherein the first synchronization module further comprises:
and the first original data synchronization sub-module is used for periodically synchronizing the original data in the original database to the calculation library.
9. The apparatus according to any one of claims 6-8, further comprising:
the second receiving module is used for receiving different service data sent by an application client so that the original database stores the service data, wherein each service data in the different service data corresponds to at least one preset rule in different preset rules;
the raw data synchronization module further comprises:
the second original data synchronization submodule is used for synchronizing original data pre-stored in an original database and the service data to a calculation base;
the processing module comprises:
and the processing submodule is used for processing the original data in the calculation library according to the service data and a preset rule corresponding to the service data to obtain the service data and result data corresponding to the preset rule, wherein the different preset rules are determined according to different service requirements of the application client.
10. The apparatus according to claim 6, wherein there are a plurality of reading libraries, there are a plurality of application clients, there is a corresponding relationship between each reading library and one application client, each application client corresponds to one service requirement, and the different preset rules are determined according to different service requirements of different application clients;
the result data synchronization module includes:
and the result data synchronization submodule is used for synchronizing the result data corresponding to the different preset rules to the reading libraries corresponding to different application clients so that the reading libraries can respectively return the corresponding result data to the application clients.
11. A data processing apparatus, comprising:
one or more processors; and
one or more computer-readable instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform the data processing method of any of claims 1 to 5.
12. A computer-readable storage medium, characterized in that it stores a computer program causing a processor to execute the data processing method according to any one of claims 1 to 5.
CN201910804689.6A 2019-08-28 2019-08-28 Data processing method, device and computer readable storage medium Active CN110674147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910804689.6A CN110674147B (en) 2019-08-28 2019-08-28 Data processing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910804689.6A CN110674147B (en) 2019-08-28 2019-08-28 Data processing method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110674147A true CN110674147A (en) 2020-01-10
CN110674147B CN110674147B (en) 2023-02-28

Family

ID=69076423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910804689.6A Active CN110674147B (en) 2019-08-28 2019-08-28 Data processing method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110674147B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612802A (en) * 2020-12-19 2021-04-06 前海飞算科技(深圳)有限公司 Real-time data middlebox processing method, device and platform

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197876A (en) * 2006-12-06 2008-06-11 中兴通讯股份有限公司 Method and system for multi-dimensional analysis of message service data
CN101442552A (en) * 2008-12-29 2009-05-27 上海全景数字技术有限公司 Configuration and synchronization method for distributed SIG system
CA2709498A1 (en) * 2009-07-10 2011-01-10 Xkoto Inc. System and method for subunit operations in a database
WO2017080431A1 (en) * 2015-11-12 2017-05-18 中国银联股份有限公司 Log analysis-based database replication method and device
CN108399256A (en) * 2018-03-06 2018-08-14 北京慧萌信安软件技术有限公司 Heterogeneous database content synchronization method, device and middleware
US20180268017A1 (en) * 2017-03-17 2018-09-20 International Business Machines Corporation Data compartments for read/write activity in a standby database
CN108777718A (en) * 2018-06-22 2018-11-09 阿里巴巴集团控股有限公司 A kind of operation system passes through client and accesses reads the method and apparatus for writing few system more
CN110096547A (en) * 2019-03-21 2019-08-06 深圳壹账通智能科技有限公司 Supply synchronous method, device, computer equipment and the computer storage medium of data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197876A (en) * 2006-12-06 2008-06-11 中兴通讯股份有限公司 Method and system for multi-dimensional analysis of message service data
CN101442552A (en) * 2008-12-29 2009-05-27 上海全景数字技术有限公司 Configuration and synchronization method for distributed SIG system
CA2709498A1 (en) * 2009-07-10 2011-01-10 Xkoto Inc. System and method for subunit operations in a database
WO2017080431A1 (en) * 2015-11-12 2017-05-18 中国银联股份有限公司 Log analysis-based database replication method and device
US20180268017A1 (en) * 2017-03-17 2018-09-20 International Business Machines Corporation Data compartments for read/write activity in a standby database
CN108399256A (en) * 2018-03-06 2018-08-14 北京慧萌信安软件技术有限公司 Heterogeneous database content synchronization method, device and middleware
CN108777718A (en) * 2018-06-22 2018-11-09 阿里巴巴集团控股有限公司 A kind of operation system passes through client and accesses reads the method and apparatus for writing few system more
CN110096547A (en) * 2019-03-21 2019-08-06 深圳壹账通智能科技有限公司 Supply synchronous method, device, computer equipment and the computer storage medium of data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
范金锋等: "一种支持异构数据库的同步与交换方法", 《电力信息化》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612802A (en) * 2020-12-19 2021-04-06 前海飞算科技(深圳)有限公司 Real-time data middlebox processing method, device and platform

Also Published As

Publication number Publication date
CN110674147B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN109672856B (en) Resource synchronization method and device
CN111193788A (en) Audio and video stream load balancing method and device
CN108880851B (en) Configuration updating method and interaction system
CN109120879B (en) Video conference processing method and system
CN110381030B (en) Method and device for processing synchronization request
CN109660753B (en) Resource synchronization method and device
CN110557319B (en) Message processing method and device based on video network
CN110650171A (en) Video networking service scheduling system and method
CN110213334B (en) Method and device for transmitting shared file
CN109151519B (en) Configuration distribution method and system based on video network
CN109151061B (en) Data storage method and device
CN110545244A (en) message distribution method and device
CN109743360B (en) Information processing method and device
CN110674147B (en) Data processing method, device and computer readable storage medium
CN110166840B (en) Service processing method, system and device
CN110493319B (en) Data synchronization method, system and device
CN110557611B (en) Information synchronization method, device and storage medium
CN110213533B (en) Method and device for acquiring video stream monitored by video network
CN110830185B (en) Data transmission method and device
CN110266768B (en) Data transmission method and system
CN110267110B (en) Concurrent on-demand processing method and system based on video network
CN110191202B (en) Method and device for determining access address of equipment
CN110475088B (en) User login method and device
CN110324286B (en) Conference control system and method
CN111064988A (en) Log saving method and device

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