Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are used merely to distinguish one device, module, or unit from another device, module, or unit, and are not intended to limit the order or interdependence of the functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a data processing method according to an embodiment of the disclosure, as shown in fig. 1, the method may include:
step S101, a service data processing request of a user is obtained, wherein the service data processing request comprises a user identifier and real-time service data to be processed;
specifically, the execution subject of the technical scheme of the present disclosure is a rule engine server in a distributed system. The rule engine server receives a service data processing request sent by the user terminal, wherein the service data processing request can be a request for checking real-time service data, and the service data processing request comprises a user identifier which is identification information capable of uniquely determining the user identity. The service data processing request further includes real-time service data to be processed related to the service of the user, for example, if the user is an e-commerce enterprise, the real-time service data may be user order data or the like.
Step S102, obtaining data characteristics of real-time service data;
analyzing the real-time service data, extracting the data characteristics of the real-time service data, wherein the data characteristics are characteristic information for distinguishing one type of service data from other service data or characteristic information for distinguishing one type of service data from other types of service data.
In one possible implementation, the data characteristics include at least one of:
service identification and service type identification.
The data features may include at least one of a service identifier or a service type identifier, or may be feature information that can distinguish service data received in real time, such as feature information related to a data type.
Step S103, based on the user identification and the data characteristics, acquiring service rule data of real-time service data corresponding to the user identification and the data characteristics from a service rule database, wherein each data characteristic corresponding to each user identification and user-defined service rule data corresponding to each data characteristic are stored in the service rule database in an associated manner;
because in the business rule database, each data characteristic corresponding to each user identifier and the user-defined business rule data corresponding to each data characteristic are stored in an associated mode, the corresponding data characteristic can be obtained according to the user identifier, and the corresponding business rule data can be obtained according to the data characteristic. The business rule data are rule data customized by a user aiming at the business data, and different business rule data are customized for the business data with different data characteristics.
Step S104, checking the real-time business data based on the business rule data corresponding to the real-time business data to obtain a checking result, and sending the checking result to the event processing server so that the event processing server carries out corresponding processing based on the checking result.
The rule engine server checks the real-time service data based on the service rule data, and determines whether the real-time service data accords with the service rule data, and the service data which is successfully checked can trigger the corresponding service event. The rule engine server sends the successfully checked service data to the service processing server, and the service processing server correspondingly processes the successfully checked service data, triggers corresponding service events and enters the next service flow.
In one possible implementation, the service rule database is stored in a rule configuration server, and based on the user identifier and the data feature, service rule data of real-time service data corresponding to the user identifier and the data feature is obtained from the service rule database, including:
sending a service rule data acquisition request to a rule configuration server, wherein the service rule data acquisition request comprises a user identifier and data characteristics;
The receiving rule configuration server transmits business rule data based on the user identification and the data characteristics.
In practical application, a user can customize service rule data according to service requirements through a rule configuration system. The rule configuration system comprises user equipment and a rule configuration server, wherein a business rule database is stored in the rule configuration server. The rule configuration system provides a service rule data self-defining function for a user, the user can configure a certain or a certain service rule on a visual interface corresponding to the function of the user equipment, the configured service rule data is sent to the rule configuration server, the rule configuration server obtains the data characteristics of the service rule data, and the data characteristics and the corresponding service rule data, and the user identification and the corresponding data characteristics of the user sending the service rule data are associated and stored in the service rule database.
The rule engine server can request the service rule data from the rule configuration server, and the rule configuration server obtains the user identification and the data characteristic in the request according to the service rule data sent by the rule engine server, sends the corresponding service rule data to the rule engine server, and loads the service rule data through the rule configuration loader and is used for checking the real-time service data. In a distributed system, at least two rule configuration systems, and at least two rule engine servers may be included.
In the embodiment of the disclosure, the configuration of the business rule data and the verification of the real-time business data by using the business rule data are separately carried out, the business rule data which are personally configured by the user can be dynamically loaded into the rule engine server for processing in the business process, and the verification of the business data of different users can be realized while the data is operated, so that the data verification efficiency is improved. Moreover, through the personalized configuration rule data of the user, the problem of configuration abnormality caused by unified configuration rules is avoided, the research and development cost of the service rules can be reduced, and the customizable capacity of the system service is improved.
In one possible implementation, the real-time service data includes at least one service parameter, and for one service parameter, the service rule data includes a service verification rule corresponding to the service parameter.
In practical application, according to different functions or service types of service implementation, the real-time service data may include at least one service parameter, and the service rule data corresponding to each service parameter includes a service verification rule corresponding to the service parameter, and the service parameter may be verified by the service verification rule.
In one possible implementation, the service verification rule includes at least one of:
the verification operation to be met, the data type to be met, the parameter value range to be met and the parameter form to be met.
In practical application, the service verification rule may be a rule for verifying and configuring a service parameter. The service verification rule includes verification operations to be satisfied by the service parameters, for example, operations equal to, unequal to, greater than, less than, etc.; the type of data to be satisfied, for example, whether the service parameter belongs to a fixed value (generally referred to as a specific value) or a reference value (generally referred to as reference), and the like; the parameter value range to be satisfied may be a value range or a value preset for each parameter; the parameter form to be satisfied may be that the service parameter needs to be satisfied, and may not be a specific value, but an expression, etc.
In one possible implementation, for a service parameter, when the service parameter includes a plurality of fields, the corresponding service check rule includes sub-check rules for each field, and rule logic relationships between the sub-check rules.
In practical application, when a service parameter includes two or more fields, each field needs to be checked, so when the service check rule of the service parameter is configured, sub-check rules and logic relations among the sub-check rules are configured for each field, and the check of the service parameter is realized based on the sub-check rules and the logic relations of each field.
In one possible implementation manner, when the service parameter includes a plurality of fields, verifying the real-time service data based on service rule data corresponding to the real-time service data to obtain a verification result, including:
and checking whether the sub-check rules corresponding to the fields in the real-time service data meet the rule logic relationship or not to obtain a check result.
In practical application, when the service parameters in the real-time service data comprise a plurality of fields, each field needs to be checked to determine whether the sub-check rule of each field meets the rule logic relationship. For example, the real-time service data comprises three fields a, b and c, and correspondingly, the sub-verification rule corresponding to each field is a1, b1 and c1 respectively, and the rule logic relationship is that one of a1 or b1 is satisfied and c1 is satisfied; when the rule check is performed on the service data, whether a meets a1 or b meets b1 and whether c meets c1 are required to be checked, if a meets a1 and c meets c1, the check result is successful, or b meets b1 and c1, and the check result is also successful. The real-time business data which is successfully checked can be triggered by the business event, if the check fails, the corresponding business event can not be triggered, and the business rule server sends the real-time business data which is successfully checked to the event processing server to be correspondingly processed, so that the corresponding business event is triggered.
In one possible implementation, before acquiring the data characteristic of the real-time service data, the method further includes:
normalizing the real-time service data;
acquiring data characteristics of real-time service data, including:
and acquiring the data characteristics of the real-time service data after normalization processing.
In practical application, the rule engine server may perform normalization processing on the service rule data before the data features of the real-time service data are acquired, where the normalization processing includes removing invalid characters such as spaces in the data, performing unified case processing on the characters, and performing data feature extraction on the service data after the normalization processing, so as to improve the speed of data processing and improve the accuracy of data processing.
In order to describe the technical solution of the embodiments of the present disclosure in more detail, a specific embodiment is used to describe the data processing procedure in the technical solution of the present disclosure.
As shown in fig. 2, a user may configure service rule data through a rule configuration interface (such as a rule configuration center shown in the figure) of the user equipment, store a user identifier and corresponding data features, data features and corresponding service rule data in a service rule database (such as a rule base shown in the figure), and load the service rule data into a rule engine server (such as a rule engine shown in the figure) through a rule configuration loader. The rule engine server obtains real-time service data (data shown in the figure), normalizes the service data (data preprocessing shown in the figure), obtains user identification and data characteristics of the real-time service data, obtains corresponding service rule data (rule routing shown in the figure) according to the user identification and the data characteristics, analyzes the service rule data (rule analysis shown in the figure), obtains service check rules corresponding to each service parameter, checks each service parameter in the real-time service data (rule judgment shown in the figure) based on the service check rules, sends the real-time service data successfully checked to the event processing server (event engine shown in the figure) through the rule response module (rule response shown in the figure), registers service events through the event register, and the event processing server correspondingly processes the real-time service data successfully checked, triggers the corresponding service events, is applied to a service system of a tenant, and receives response information returned by the service system, so that the service data checking process is completed.
The following describes, by way of a specific embodiment, a rule configuration process using a rule configuration system in the technical solution of the present disclosure. Shown in fig. 3 is a visual interface in the rule configuration system through which rule editors can edit and enter rules. Fliter Setup in the figure indicates filter settings, and the embodiment performs rule configuration by setting filters. Wherein, left value represents metadata field, namely each field of the business parameter of the check rule to be configured, user.active represents the Active field of the business parameter User, this field represents the User that is in the effective state at present; user. Employee. Hrbp denotes the employee. Hrbp field of the service parameter User, which describes a scenario of a multi-layer query in the human resources domain: one service parameter User in the system is associated with a corresponding Employee account, and one or more HRBP(s) are associated for each Employee; when the rule needs to search the HRBP of the User, a search range can be set by adding an' mode; a rule configuration of fields of multiple layers may be performed, such as Name, ID, create Time, employee ID of the next layer of User, and Name, ID of the next layer of employee ID; the operator represents a verify operation, which may be "=" as shown in the figure; type represents a data Type, which may be a fixed value specified value or a reference value reference shown in the figure; the Right Value represents the Value or expression of the service parameter; 1, 2 and 3 shown in the figure respectively correspond to a piece of sub-check rule; for example, the sub-check rule 1 means that the check operation to be satisfied by the parameter field user.active is "=", the data type to be satisfied is specified value, and the value to be satisfied is more. A piece of sub-check rule can be deleted by adding the sub-check rule by "+" shown in the figure and by "×" in the figure; the Relation represents a rule logic relationship, and '1 and2or 3' in the figure represents that each sub-check rule of the service parameter User needs to satisfy the rule logic relationship to satisfy the sub-check rules 1and2or satisfy the sub-check rules 1and 3. After the business rule configuration corresponding to one business parameter is completed, the business rule configuration can be submitted by selecting a Submit or cancelled by Cancel.
According to the data processing method provided by the embodiment of the disclosure, a rule engine server in a distributed system acquires a service data processing request of a user, wherein the service data processing request comprises a user identifier and real-time service data to be processed; acquiring data characteristics of real-time service data; based on the user identification and the data characteristics, acquiring service rule data of real-time service data corresponding to the user identification and the data characteristics from a service rule database, wherein each data characteristic corresponding to each user identification and user-defined service rule data corresponding to each data characteristic are stored in the service rule database in an associated mode; and verifying the real-time service data based on the service rule data of the real-time service data to obtain a verification result, and sending the verification result to the event processing server so that the event processing server carries out corresponding processing based on the verification result. According to the technical scheme provided by the disclosure, the real-time service data is acquired through the rule engine server in the distributed system, the corresponding service rule data is acquired from the service rule database to verify the real-time service data, and the data processing speed is improved through the distributed system; the business rule data in the business rule database is user-defined, so that the problem of abnormal rule configuration is avoided.
Based on the same principle as the method shown in fig. 1, there is also provided in an embodiment of the present disclosure a data processing apparatus 20, as shown in fig. 4, the data processing apparatus 20 may include:
a request acquisition module 21, configured to acquire a service data processing request of a user, where the service data processing request includes a user identifier and real-time service data to be processed;
a feature acquisition module 22, configured to acquire a data feature of the real-time service data;
a rule obtaining module 23, configured to obtain, from a service rule database, service rule data of the real-time service data corresponding to the user identifier and the data feature based on the user identifier and the data feature, where the service rule database stores, in association, each data feature corresponding to each user identifier and user-defined service rule data corresponding to each data feature;
and the data verification module 24 is configured to verify the real-time service data based on the service rule data of the real-time service data, obtain a verification result, and send the verification result to an event processing server, so that the event processing server performs corresponding processing based on the verification result.
In one possible implementation, the business rule database is stored in a rule configuration server, and the rule acquisition module 23 is configured to:
sending a service rule data acquisition request to a rule configuration server, wherein the service rule data acquisition request comprises a user identifier and data characteristics;
the receiving rule configuration server sends business rule data based on the user identification and the data characteristics;
wherein the data characteristic comprises at least one of:
service identification and service type identification.
In one possible implementation, the real-time service data includes at least one service parameter, and the service rule data includes a service verification rule corresponding to each service parameter.
In one possible implementation, the service verification rule includes at least one of:
the verification operation to be met, the data type to be met, the parameter value range to be met and the parameter form to be met.
In one possible implementation, for a service parameter, when the service parameter includes a plurality of fields, the corresponding service check rule includes sub-check rules for each field, and rule logic relationships between the sub-check rules.
In one possible implementation, when the service parameter includes a plurality of fields, the data verification module 24 is configured to:
And checking whether the sub-check rules corresponding to the fields in the real-time service data meet the rule logic relationship or not to obtain a check result.
In one possible implementation, the data processing apparatus 20 further comprises a data processing module;
the data processing module is used for carrying out normalization processing on the real-time service data;
the feature acquisition module 22 is configured to:
and acquiring the data characteristics of the real-time service data after normalization processing.
The data processing apparatus according to the embodiments of the present disclosure may perform the data processing method provided by the embodiments of the present disclosure, and the implementation principle is similar, and actions performed by each module in the data processing apparatus according to each embodiment of the present disclosure correspond to steps in the data processing method according to each embodiment of the present disclosure, and detailed functional descriptions of each module of the data processing apparatus may be specifically referred to descriptions in the corresponding data processing method shown in the foregoing, which are not repeated herein.
The data processing device provided by the embodiment of the disclosure obtains a service data processing request of a user, wherein the service data processing request comprises a user identifier and real-time service data to be processed; acquiring data characteristics of real-time service data; based on the user identification and the data characteristics, acquiring service rule data of real-time service data corresponding to the user identification and the data characteristics from a service rule database, wherein each data characteristic corresponding to each user identification and user-defined service rule data corresponding to each data characteristic are stored in the service rule database in an associated mode; and verifying the real-time service data based on the service rule data of the real-time service data to obtain a verification result, and sending the verification result to the event processing server so that the event processing server carries out corresponding processing based on the verification result. According to the technical scheme provided by the disclosure, the real-time service data is acquired through the rule engine server in the distributed system, the corresponding service rule data is acquired from the service rule database to verify the real-time service data, and the data processing speed is improved through the distributed system; the business rule data in the business rule database is user-defined, so that the problem of abnormal rule configuration is avoided.
Referring now to fig. 5, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The execution subject of the technical solution of the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
An electronic device includes: a memory and a processor, where the processor may be referred to as a processing device 601 described below, the memory may include at least one of a Read Only Memory (ROM) 602, a Random Access Memory (RAM) 603, and a storage device 608 described below, as follows:
as shown in fig. 5, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a service data processing request of a user, wherein the service data processing request comprises a user identifier and real-time service data to be processed; acquiring data characteristics of real-time service data; based on the user identification and the data characteristics, acquiring service rule data of real-time service data corresponding to the user identification and the data characteristics from a service rule database, wherein each data characteristic corresponding to each user identification and user-defined service rule data corresponding to each data characteristic are stored in the service rule database in an associated mode; and verifying the real-time service data based on the service rule data of the real-time service data to obtain a verification result, and sending the verification result to the event processing server so that the event processing server carries out corresponding processing based on the verification result.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Where the name of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a data processing method, an execution subject of which is a rule engine server in a distributed system, the method comprising:
acquiring a service data processing request of a user, wherein the service data processing request comprises a user identifier and real-time service data to be processed;
acquiring the data characteristics of the real-time service data;
based on the user identification and the data characteristics, acquiring service rule data of the real-time service data corresponding to the user identification and the data characteristics from a service rule database, wherein each data characteristic corresponding to each user identification and user-defined service rule data corresponding to each data characteristic are stored in the service rule database in an associated mode;
and verifying the real-time service data based on the service rule data of the real-time service data to obtain a verification result, and sending the verification result to an event processing server so that the event processing server carries out corresponding processing based on the verification result.
In one possible implementation manner, the service rule database is stored in a rule configuration server, and based on the user identifier and the data feature, service rule data of the real-time service data corresponding to the user identifier and the data feature is obtained from the service rule database, including:
Sending a business rule data acquisition request to the rule configuration server, wherein the business rule data acquisition request comprises the user identifier and the data characteristic;
receiving business rule data sent by the rule configuration server based on the user identification and the data characteristics;
wherein the data characteristic comprises at least one of:
service identification and service type identification.
In one possible implementation manner, the real-time service data includes at least one service parameter, and the service rule data includes a service verification rule corresponding to each service parameter.
In one possible implementation manner, the service verification rule includes at least one of the following:
the verification operation to be met, the data type to be met, the parameter value range to be met and the parameter form to be met.
In one possible implementation, for a service parameter, when the service parameter includes a plurality of fields, the corresponding service check rule includes sub-check rules for each field, and rule logic relationships between the sub-check rules.
In one possible implementation manner, when the service parameter includes a plurality of fields, verifying the real-time service data based on the service rule data corresponding to the real-time service data to obtain a verification result includes:
And checking whether the sub-check rules corresponding to the fields in the real-time service data meet the rule logic relationship or not to obtain a check result.
In one possible implementation, before acquiring the data feature of the real-time service data, the method further includes:
normalizing the real-time service data;
the acquiring the data characteristics of the real-time service data comprises the following steps:
and acquiring the data characteristics of the real-time service data after normalization processing.
According to one or more embodiments of the present disclosure, there is provided a data processing apparatus, the apparatus comprising:
the request acquisition module is used for acquiring a service data processing request of a user, wherein the service data processing request comprises a user identifier and real-time service data to be processed;
the feature acquisition module is used for acquiring the data features of the real-time service data;
the rule acquisition module is used for acquiring business rule data of the real-time business data corresponding to the user identification and the data characteristics from a business rule database based on the user identification and the data characteristics, wherein each data characteristic corresponding to each user identification and user-defined business rule data corresponding to each data characteristic are stored in the business rule database in an associated mode;
And the data verification module is used for verifying the real-time service data based on the service rule data of the real-time service data to obtain a verification result, and sending the verification result to an event processing server so that the event processing server carries out corresponding processing based on the verification result.
In one possible implementation manner, the business rule database is stored in a rule configuration server, and the rule acquisition module is configured to:
sending a business rule data acquisition request to the rule configuration server, wherein the business rule data acquisition request comprises the user identifier and the data characteristic;
receiving business rule data sent by the rule configuration server based on the user identification and the data characteristics;
wherein the data characteristic comprises at least one of:
service identification and service type identification.
In one possible implementation manner, the real-time service data includes at least one service parameter, and the service rule data includes a service verification rule corresponding to each service parameter.
In one possible implementation manner, the service verification rule includes at least one of the following:
The verification operation to be met, the data type to be met, the parameter value range to be met and the parameter form to be met.
In one possible implementation, for a service parameter, when the service parameter includes a plurality of fields, the corresponding service check rule includes sub-check rules for each field, and rule logic relationships between the sub-check rules.
In one possible implementation, when the service parameter includes a plurality of fields, the data checking module is configured to:
and checking whether the sub-check rules corresponding to the fields in the real-time service data meet the rule logic relationship or not to obtain a check result.
In one possible implementation, the data processing apparatus further includes a data processing module;
the data processing module is used for: normalizing the real-time service data;
the feature acquisition module is used for: and acquiring the data characteristics of the real-time service data after normalization processing.
According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: and executing the operation corresponding to the data processing method provided by the embodiment of the disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable medium for storing computer instructions that, when executed on a computer, cause the computer to perform operations corresponding to the data processing method provided by the embodiments of the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.