CN111581291B - Data processing method, device, electronic equipment and readable medium - Google Patents

Data processing method, device, electronic equipment and readable medium Download PDF

Info

Publication number
CN111581291B
CN111581291B CN202010387645.0A CN202010387645A CN111581291B CN 111581291 B CN111581291 B CN 111581291B CN 202010387645 A CN202010387645 A CN 202010387645A CN 111581291 B CN111581291 B CN 111581291B
Authority
CN
China
Prior art keywords
data
service
rule
real
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010387645.0A
Other languages
Chinese (zh)
Other versions
CN111581291A (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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202010387645.0A priority Critical patent/CN111581291B/en
Publication of CN111581291A publication Critical patent/CN111581291A/en
Application granted granted Critical
Publication of CN111581291B publication Critical patent/CN111581291B/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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The disclosure provides a data processing method, a data processing device, electronic equipment and a readable medium, and relates to the technical field of information processing. The method comprises the following steps: 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 to acquire data characteristics of the 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 manner; and verifying the real-time service data based on the service rule data of the real-time service data to obtain a verification result. According to the technical scheme, the distributed system is used for processing, so that the data processing speed is improved; the business rule data in the business rule database is user-defined, so that the problem of abnormal rule configuration is avoided.

Description

Data processing method, device, electronic equipment and readable medium
Technical Field
The disclosure relates to the technical field of information processing, and in particular relates to a data processing method, a data processing device, electronic equipment and a readable medium.
Background
In the traditional software engineering development, the business logic is generally written into an application program in a hard coding mode, when the business logic is changed, corresponding codes are correspondingly modified, the business logic is subjected to development, testing, verification, online and other processes, and the cost of the business logic change is high. In the field of enterprise software servitization (Software as a Service, saaS) services, a set of services is generally provided to support different tenants, and the diversity and variability of rules of the service logic are more obvious according to different service scenarios of the tenants.
At present, in the field of SaaS service, because of supporting a multi-tenant architecture, business rules are varied, and the problem of abnormal rule configuration is easy to occur. Moreover, existing business rule engine systems, such as Drools, esper, etc. They are mostly stand-alone deployments, and the computational power is difficult to expand. With the rapid development of the internet, the traffic data volume also increases rapidly, and when large-scale data is faced, the data processing speed of most business rule engines cannot meet the requirement.
Disclosure of Invention
The present disclosure provides a data processing method, apparatus, electronic device, and readable medium, for solving the problems existing in the prior art.
In a first aspect, a data processing method is provided, where an execution subject is a rule engine server in a distributed system, the method including:
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.
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 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 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;
acquiring data characteristics of real-time service data, including:
and acquiring the data characteristics of the real-time service data after normalization processing.
In a second aspect, there is provided a data processing 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 a third aspect, 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: operations corresponding to the data processing method as shown in the first aspect of the present disclosure are performed.
In a fourth aspect, the present disclosure provides a computer readable medium for storing computer instructions which, when run on a computer, cause the computer to perform operations corresponding to the data processing method as shown in the first aspect of the present disclosure.
The beneficial effects that this disclosure provided technical scheme brought are:
the embodiment of the disclosure provides a data processing method, a device, electronic equipment and a readable medium, wherein a rule engine server in a distributed system acquires a service data processing request of a user, and 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.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings that are required to be used in the description of the embodiments of the present disclosure will be briefly introduced below.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram of a data processing process provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a visual interface for rule editing and entry in a rule configuration system provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
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.

Claims (10)

1. A data processing method, wherein an execution subject of the method 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.
2. The data processing method according to claim 1, wherein the business rule database is stored in a rule configuration server, and based on the user identification and the data feature, business rule data of the real-time business data corresponding to the user identification and the data feature is acquired from the business rule database, comprising:
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.
3. A data processing method according to claim 1 or 2, wherein the real-time service data comprises at least one service parameter, and the service rule data comprises a service check rule corresponding to each service parameter.
4. A data processing method according to claim 3, wherein the traffic verification rule comprises 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.
5. A data processing method according to claim 3, wherein for a service parameter, when the service parameter comprises a plurality of fields, the corresponding service check rule comprises a sub-check rule of each field, and a rule logic relationship between the sub-check rules.
6. The data processing method according to claim 4, wherein 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, comprises:
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.
7. A data processing method according to claim 1 or 2, characterized in that before the data characteristics of the real-time traffic data are acquired, the method further comprises:
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.
8. 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.
9. 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: a data processing method according to any one of claims 1 to 7.
10. A computer readable medium for storing computer instructions which, when run on a computer, cause the computer to perform the data processing method of any of the preceding claims 1-7.
CN202010387645.0A 2020-05-09 2020-05-09 Data processing method, device, electronic equipment and readable medium Active CN111581291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010387645.0A CN111581291B (en) 2020-05-09 2020-05-09 Data processing method, device, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010387645.0A CN111581291B (en) 2020-05-09 2020-05-09 Data processing method, device, electronic equipment and readable medium

Publications (2)

Publication Number Publication Date
CN111581291A CN111581291A (en) 2020-08-25
CN111581291B true CN111581291B (en) 2023-04-28

Family

ID=72123245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010387645.0A Active CN111581291B (en) 2020-05-09 2020-05-09 Data processing method, device, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN111581291B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112017007A (en) * 2020-08-31 2020-12-01 中国平安财产保险股份有限公司 User behavior data processing method and device, computer equipment and storage medium
CN111913998A (en) * 2020-09-11 2020-11-10 北京百度网讯科技有限公司 Data processing method, device, equipment and storage medium
CN112540996B (en) * 2020-11-12 2023-11-24 Oppo(重庆)智能科技有限公司 Service data verification method and device, electronic equipment and storage medium
CN112612802A (en) * 2020-12-19 2021-04-06 前海飞算科技(深圳)有限公司 Real-time data middlebox processing method, device and platform
CN112395541A (en) * 2020-12-29 2021-02-23 畅捷通信息技术股份有限公司 Data content verification method, device and system, storage medium and computing equipment
CN112767036A (en) * 2021-01-25 2021-05-07 北京有竹居网络技术有限公司 Service processing method and device
CN113094191A (en) * 2021-04-21 2021-07-09 矢量云科信息科技(无锡)有限公司 Business rule processing method, device, server and storage medium
CN113486061A (en) * 2021-06-30 2021-10-08 平安证券股份有限公司 Data processing method and device, terminal equipment and storage medium
CN113837584B (en) * 2021-09-17 2024-04-12 平安养老保险股份有限公司 Service processing system and abnormal data processing method based on service processing system
CN113986384A (en) * 2021-10-28 2022-01-28 数字天堂(北京)网络技术有限公司 Processing device, method, equipment and storage medium based on client and cloud
CN114741577B (en) * 2022-04-27 2023-08-11 广域铭岛数字科技有限公司 Service data management method, system, electronic equipment and readable storage medium
CN117749531A (en) * 2024-02-20 2024-03-22 中国信息通信研究院 Data platform management method, device, equipment and medium based on industrial Internet

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040560A (en) * 2016-02-04 2017-08-11 阿里巴巴集团控股有限公司 A kind of method for processing business and device based on business platform
CN109274731A (en) * 2018-09-04 2019-01-25 北京京东金融科技控股有限公司 Deployment, call method and the device of web services based on multi-tenant technology

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150161547A1 (en) * 2013-12-10 2015-06-11 Oracle International Corporation Methods and systems to define and execute customer declarative business rules to extend business applications
US20150293764A1 (en) * 2014-04-10 2015-10-15 Omprakash VISVANATHAN Method and system to compose and execute business rules
US20190379748A1 (en) * 2018-06-12 2019-12-12 Rich Context Llc Systems, devices, and methods for presenting customized content through web api

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040560A (en) * 2016-02-04 2017-08-11 阿里巴巴集团控股有限公司 A kind of method for processing business and device based on business platform
CN109274731A (en) * 2018-09-04 2019-01-25 北京京东金融科技控股有限公司 Deployment, call method and the device of web services based on multi-tenant technology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈伟 ; 沈备军 ; 戚正伟 ; .面向SaaS应用的业务逻辑定制框架的研究与实现.计算机应用研究.2011,(第01期),155-158. *

Also Published As

Publication number Publication date
CN111581291A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111581291B (en) Data processing method, device, electronic equipment and readable medium
CN110390493B (en) Task management method and device, storage medium and electronic equipment
CN112596720A (en) Service operation method and device, electronic equipment and computer storage medium
CN111338813B (en) Method, device, medium and electronic equipment for dynamically generating middleware
CN111628938B (en) Branch merging method, device, electronic equipment and computer storage medium
CN116302271A (en) Page display method and device and electronic equipment
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN114428815A (en) Data storage method and device, electronic equipment and computer readable medium
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN113393288A (en) Order processing information generation method, device, equipment and computer readable medium
CN111639918A (en) Approval method and device, electronic equipment and computer readable medium
CN112767036A (en) Service processing method and device
CN111782549A (en) Test method and device and electronic equipment
CN111598544A (en) Method and apparatus for processing information
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
CN111930704B (en) Service alarm equipment control method, device, equipment and computer readable medium
CN113641966B (en) Application integration method, system, equipment and medium
CN112084440B (en) Data verification method, device, electronic equipment and computer readable medium
CN111581305B (en) Feature processing method, device, electronic equipment and medium
CN111626787B (en) Resource issuing method, device, medium and equipment
CN113128200B (en) Method and device for processing information
CN116886531A (en) Service processing method, device, medium and electronic equipment
CN116545729A (en) Multi-application security test method, device, electronic equipment and computer readable medium
CN117785977A (en) Metadata acquisition method, device and equipment

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
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant