CN113282274B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN113282274B
CN113282274B CN202010104578.7A CN202010104578A CN113282274B CN 113282274 B CN113282274 B CN 113282274B CN 202010104578 A CN202010104578 A CN 202010104578A CN 113282274 B CN113282274 B CN 113282274B
Authority
CN
China
Prior art keywords
data processing
attribute
parameters
parameter
key
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
CN202010104578.7A
Other languages
Chinese (zh)
Other versions
CN113282274A (en
Inventor
江兆晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202010104578.7A priority Critical patent/CN113282274B/en
Publication of CN113282274A publication Critical patent/CN113282274A/en
Application granted granted Critical
Publication of CN113282274B publication Critical patent/CN113282274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a data processing method and device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message; matching expressions corresponding to the attribute names and the attribute values in a data processing rule set through a plug-in and a rule analyzer, and determining first parameters corresponding to the expressions; and screening the first parameters to obtain second parameters corresponding to the parameter key names, and determining key values in the second parameters to execute data processing operation corresponding to the key values. In the embodiment, the plug-in and the rule analyzer are utilized to match the expression to acquire different key values of the same parameter key, no additional judgment logic is needed, and the acquisition of the parameter and the judgment logic are executed by the plug-in, so that the service pressure of the data processing system is reduced.

Description

Data processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus.
Background
At present, corresponding parameters are added aiming at new data processing rules, and judgment logic needs to be added in the system. For example, if the package label module determines that the merchant is a, printing is performed, otherwise, printing is not performed, for example, if the merchant= = "a" printing is performed, and else printing is not performed.
In carrying out the present invention, the inventors have found that at least the following problems exist in the prior art: every time a data processing rule is newly added, namely a mode of judging logic codes and putting the logic codes on line is required to be set in a module, the system codes are more and more bulked, the safety performance of the system is affected, and the maintenance difficulty of the system is increased.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a data processing method and apparatus, which at least can solve the problem of the prior art that the system code is bloated due to the way of adding the judgment logic code to the data processing rule.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a data processing method including:
receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message;
matching expressions corresponding to the attribute names and the attribute values in a data processing rule set through a plug-in and a rule analyzer, and determining first parameters corresponding to the expressions;
and screening the first parameters to obtain second parameters corresponding to the parameter key names, and determining key values in the second parameters to execute data processing operation corresponding to the key values.
Optionally, before the receiving the data processing request, the method further includes: and introducing the plug-in to call the plug-in to draw all data processing rules into a storage unit of the data processing system from an interface of a configuration center in response to the starting of the data processing system.
Optionally, before invoking the plug-in from the interface of the configuration center in response to the start-up of the data processing system to pull all data processing rules into the storage unit of the data processing system, the method further comprises:
carrying out expression and parameter setting on the data processing rules in the configuration center;
receiving information configuration of attribute names and attribute values in the expression to obtain the configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
based on the configured expression and the configured parameter, a configured data processing rule is generated.
Optionally, the matching, by the plug-in and the rule parser, the expressions corresponding to the attribute names and the attribute values in the data processing rule set further includes: and generating a set type based on the attribute name and the attribute value, and matching an expression corresponding to the set type in the data processing rule set through the plug-in and the rule analyzer.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a data processing apparatus including:
the request receiving module is used for receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message;
the parameter determining module is used for determining a first parameter corresponding to the expression by matching the expression corresponding to the attribute name and the attribute value in the data processing rule set through the plug-in and the rule analyzer;
and the data processing module is used for screening the first parameter to obtain a second parameter corresponding to the parameter key name, and determining a key value in the second parameter so as to execute data processing operation corresponding to the key value.
Optionally, the method further comprises a rule pulling module for: and introducing the plug-in to call the plug-in to draw all data processing rules into a storage unit of the data processing system from an interface of a configuration center in response to the starting of the data processing system.
Optionally, the method further comprises a rule configuration module for:
carrying out expression and parameter setting on the data processing rules in the configuration center;
receiving information configuration of attribute names and attribute values in the expression to obtain the configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
based on the configured expression and the configured parameter, a configured data processing rule is generated.
Optionally, the parameter determining module is further configured to: and generating a set type based on the attribute name and the attribute value, and matching an expression corresponding to the set type in the data processing rule set through the plug-in and the rule analyzer.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a data processing electronic device.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement any of the data processing methods described above.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements any of the above-described data processing methods.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the method solves the problem that the existing data processing rule is increased and the code is required to be frequently modified, and only the expression of the message field and the parameters corresponding to the expression are required to be configured in the configuration center. The data processing system analyzes and matches the expression conforming to the content of the corresponding field of the message context through the plug-in, obtains the corresponding parameters, and does not judge the logic code to obtain through if else, thereby greatly reducing the number of times and the modification quantity of the code, reducing the online risk of the system and accelerating the iteration speed of data processing.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative data processing method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the overall framework of an embodiment of the present invention;
FIG. 4 is a schematic diagram of the main modules of a data processing apparatus according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1, a main flowchart of a data processing method provided by an embodiment of the present invention is shown, including the following steps:
s101: receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message;
s102: matching expressions corresponding to the attribute names and the attribute values in a data processing rule set through a plug-in and a rule analyzer, and determining first parameters corresponding to the expressions;
s103: and screening the first parameters to obtain second parameters corresponding to the parameter key names, and determining key values in the second parameters to execute data processing operation corresponding to the key values.
In the above embodiment, for step S101, the data processing request in the present invention mainly refers to a request for a service, where the request usually carries personal information of a user and a requirement, for example, a business needs to print. Where "merchant a" is typically stored in a message (service message) and the requirements are stored in a key name key of a parameter, such as seller_print.
Take specific codes as examples:
wherein paramRequest is a parameter, order is a message, getParamResult is a method for acquiring the parameter.
The message refers to the data content to be transmitted between different system modules, usually in json format, and consists of attribute names and attribute values. In the case of "merchant is a to print", the merchant is an attribute name and a is an attribute value. The determination of the attribute name and attribute value is determined by the format of the settings in the message.
For example, the message { "orgNo": "6", "distributor No": "6", "wasehouse No": "80", "seller": A "} contains four attribute names, which are:
orgNo: mechanism numbering
distributive no: distribution center numbering
WareHouse No: warehouse number
seller: merchant
The corresponding attribute values are 6, 80 and a, respectively.
For step S102, after receiving the request parameters, the API (Application Programming Interface ) of the plug-in traverses all data processing rules in the storage unit of the data processing system through the rule parser according to the key and the message, so as to match the expression conforming to the content of the current message field, and further obtain the parameters corresponding to the expression, i.e. the first parameters, and return the parameters to the data processing system.
The rule analyzer in the invention can match the expression format according to whether the attribute name and the attribute value in the provided message are correct or not, for example, if the message is in json format, if the content is ' seller ' A ', the expression format is met, and the message can be matched.
At present, a rule parser with more open sources, such as QLExpress, is available on the market, and parameters and expressions conforming to the conditions of the data processing rule can be matched by using the rule parser.
For step S103, the number of expressions corresponding to the same attribute name and attribute value may not be unique, and thus a plurality of expressions and corresponding first parameters may be obtained. Even if the data processing request contains a plurality of service requirements, the actions still need to be performed in sequence.
For the executed action, parameter screening can be performed by the key in the request, and only one second parameter corresponding to the key is obtained. And then, executing the operation action of the key value in the second parameter, thus completing the processing action of the data processing request.
In addition, when the data processing system acquires the parameters, the message is generally converted into a map set, and then an API interface of the plug-in is called to acquire a key value corresponding to the key name in the parameters by combining the parameter key; wherein, map is a collection type, the format is generally in key-value form, and the message entity can be converted into Map format to facilitate expression matching.
The method provided by the above embodiment introduces a plug-in and a rule parser, using a message field to define the expression of the parameter. The method solves the problem that the newly added data processing rule needs to modify the system code, does not need to add additional judgment logic, obtains parameters and judges that the logic is executed by the plug-in, reduces the service pressure of the data processing system, reduces the number of times and the amount of modification to the code, reduces the online risk, and accelerates the iteration speed of the service.
Referring to fig. 2, an alternative flow chart of a data processing method according to an embodiment of the invention is shown, comprising the following steps:
s201: carrying out expression and parameter setting on the data processing rules in the configuration center;
s202: receiving information configuration of attribute names and attribute values in the expression to obtain the configured expression;
s203: receiving information configuration of key names and key values in the parameters to obtain configured parameters;
s204: generating configured data processing rules based on the configured expressions and the configured parameters;
s205: introducing a plug-in to call an interface of a configuration center to pull all data processing rules into a storage unit of the data processing system in response to the start of the data processing system;
s206: receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message;
s207: matching expressions corresponding to the attribute names and the attribute values in a data processing rule set through a plug-in and a rule analyzer, and determining first parameters corresponding to the expressions;
s208: and screening the first parameters to obtain second parameters corresponding to the parameter key names, and determining key values in the second parameters to execute data processing operation corresponding to the key values.
In the above embodiment, the steps S206 to S208 may be referred to the descriptions of the steps S101 to S103 shown in fig. 1, and are not repeated here.
In the above embodiment, for steps S201 to S204, if a new data processing rule needs to be added, the configuration center needs to configure the expression corresponding to the message field and the parameter corresponding to the expression.
For example, when it is determined that the merchant is a, a print "× distribution" operation is performed, and two expressions and two parameters need to be configured:
(1) the expression is: seller= = 'a', the key of the corresponding parameter is seller_print, the corresponding value is "/delivery";
(2) the expression is: seller-! Key of the corresponding parameter is seller_print and corresponding value is "Null".
It should be noted that the above examples are only examples, and the corresponding expressions in the actual operation for the same data processing rule may be other values, for example, one, two, three or even more, specifically set by the staff.
For step S205, after the configuration center has configured the expressions and parameters of the data processing rules, the data processing system introduces a plug-in to pull all the data processing rules in the configuration center into the storage unit of the data processing system through the interface of the configuration center by calling the API interface of the plug-in when the system is started.
The storage unit may be a cache (e.g., redis) or a local memory, but the present invention is mainly stored in the local cache because the local cache reads faster.
It should be noted that, in the existing solution, the system is required to autonomously pull the data processing rule from the interface of the configuration center. According to the invention, the parameter introducing pressure is transferred to the plug-in by introducing the plug-in, so that the service pressure of the data processing system is reduced.
In addition, each time the data processing system is restarted, the plug-in is called to re-pull the rule from the configuration center interface once, but when the system is not restarted or closed, the parameters of the plug-in are always stored in the local cache, and the cache time can be set by a staff.
According to the method provided by the embodiment, the data processing rule can be customized according to the service requirement, and the parameter distinction can be performed through the difference of the expressions, so that compared with the existing mode of coupling the judgment logic code and the service code, the code bloating degree is effectively reduced.
Referring to fig. 3, an overall framework diagram 300 of the present invention is shown, comprising the following four components, and with the increase in business complexity, in the same system/module, different parameters need to be obtained according to different business/data processing requests:
(1) a data processing system: systems for handling specific business, such as warehouse system for printing package labels, packaging system, etc.;
(2) plug-in: the client for acquiring the parameters is provided in the form of jar packets to package the plug-ins into the items. The functions that possess mainly include: pulling the expressions and parameters in the data processing rules from the configuration center, invoking the rule parser to match the expressions and return the parameters, local caching, and so on.
(3) Rule parser: whether the attribute name and the attribute value matching expression in the provided message are correct or not can be judged;
(4) configuration center: parameters may be configured and persisted into a database and an interface is provided to obtain the parameters for the plug-in to call. The plug-in is a bridge between the data processing system and the configuration center, well decouples the relationship between the data processing system and the configuration center, and encapsulates the functions of a rule analyzer, a cache and the like.
The method provided by the embodiment of the invention solves the problem that the code needs to be frequently modified when the data processing rule is added in the prior art, and only the expression of the message field and the parameter corresponding to the expression need to be configured in the configuration center. The data processing system analyzes and matches the expression conforming to the content of the corresponding field of the message context through the plug-in, obtains the corresponding parameters, and does not judge the logic code to obtain through if else, thereby greatly reducing the modification quantity of the code, reducing the online risk of the system and accelerating the iteration speed of data processing.
Referring to fig. 4, a schematic diagram of main modules of a data processing apparatus 400 according to an embodiment of the present invention is shown, including:
a request receiving module 401, configured to receive a data processing request, obtain a message and a parameter key name in the data processing request, and determine an attribute name and an attribute value in the message;
a parameter determining module 402, configured to determine, by using a plug-in and a rule parser, a first parameter corresponding to an expression corresponding to the attribute name and the attribute value, by matching the expression corresponding to the attribute name and the attribute value in a data processing rule set;
the data processing module 403 is configured to filter the first parameter to obtain a second parameter corresponding to the parameter key name, and determine a key value in the second parameter to perform a data processing operation corresponding to the key value.
The implementation device of the present invention further includes a rule pulling module 404 (not shown in the figure) for: and introducing the plug-in to call the plug-in to draw all data processing rules into a storage unit of the data processing system from an interface of a configuration center in response to the starting of the data processing system.
The implementation device of the present invention further includes a rule configuration module 405 (not shown in the figure) for:
carrying out expression and parameter setting on the data processing rules in the configuration center;
receiving information configuration of attribute names and attribute values in the expression to obtain the configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
based on the configured expression and the configured parameter, a configured data processing rule is generated.
In the embodiment of the present invention, the parameter determining module 402 is further configured to: and generating a set type based on the attribute name and the attribute value, and matching an expression corresponding to the set type in the data processing rule set through the plug-in and the rule analyzer.
In addition, the implementation of the apparatus in the embodiments of the present invention has been described in detail in the above method, so that the description is not repeated here.
Fig. 5 illustrates an exemplary system architecture 500 in which embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505 (by way of example only). The network 504 is used as a medium to provide communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 505 via the network 504 using the terminal devices 501, 502, 503 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 501, 502, 503.
It should be noted that, the method provided by the embodiment of the present invention is generally performed by the server 505, and accordingly, the apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 6 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which can 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 section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
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 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 through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 601.
The computer readable medium shown in the present invention 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 document, 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 invention, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a request receiving module, a parameter determining module, and a data processing module. The names of these modules do not constitute a limitation on the module itself in some cases, and for example, the data processing module may also be described as "a module that performs data processing according to a key value".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message;
matching expressions corresponding to the attribute names and the attribute values in a data processing rule set through a plug-in and a rule analyzer, and determining first parameters corresponding to the expressions;
and screening the first parameters to obtain second parameters corresponding to the parameter key names, and determining key values in the second parameters to execute data processing operation corresponding to the key values.
According to the technical scheme of the embodiment of the invention, the problem that the code needs to be frequently modified in the prior art for increasing the data processing rule is solved, and only the expression of the message field and the parameter corresponding to the expression are configured in the configuration center. The data processing system analyzes and matches the expression conforming to the content of the corresponding field of the message context through the plug-in, obtains the corresponding parameters, and does not judge the logic code to obtain through if else, thereby greatly reducing the modification quantity of the code, reducing the online risk of the system and accelerating the iteration speed of data processing.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (6)

1. A method of data processing, comprising:
carrying out expression and parameter setting on the data processing rules in the configuration center;
receiving information configuration of attribute names and attribute values in the expression to obtain the configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
generating configured data processing rules based on the configured expressions and the configured parameters;
receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message;
matching expressions corresponding to the attribute names and the attribute values in a data processing rule set through a plug-in and a rule analyzer, and determining first parameters corresponding to the expressions;
and screening the first parameters to obtain second parameters corresponding to the parameter key names, and determining key values in the second parameters to execute data processing operation corresponding to the key values.
2. The method of claim 1, further comprising, prior to said receiving a data processing request:
and introducing the plug-in to call the plug-in to draw all data processing rules into a storage unit of the data processing system from an interface of a configuration center in response to the starting of the data processing system.
3. The method of claim 1, wherein matching, by a plug-in and a rule parser, expressions corresponding to the attribute names and the attribute values in a set of data processing rules, further comprises:
and generating a set type based on the attribute name and the attribute value, and matching an expression corresponding to the set type in the data processing rule set through the plug-in and the rule analyzer.
4. A data processing apparatus, comprising:
the rule configuration module is used for carrying out expression and parameter setting on the data processing rules in the configuration center; receiving information configuration of attribute names and attribute values in the expression to obtain the configured expression; receiving information configuration of key names and key values in the parameters to obtain configured parameters; generating configured data processing rules based on the configured expressions and the configured parameters;
the request receiving module is used for receiving a data processing request, acquiring a message and a parameter key name in the data processing request, and determining an attribute name and an attribute value in the message;
the parameter determining module is used for determining a first parameter corresponding to the expression by matching the expression corresponding to the attribute name and the attribute value in the data processing rule set through the plug-in and the rule analyzer;
and the data processing module is used for screening the first parameter to obtain a second parameter corresponding to the parameter key name, and determining a key value in the second parameter so as to execute data processing operation corresponding to the key value.
5. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-3.
6. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-3.
CN202010104578.7A 2020-02-20 2020-02-20 Data processing method and device Active CN113282274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010104578.7A CN113282274B (en) 2020-02-20 2020-02-20 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010104578.7A CN113282274B (en) 2020-02-20 2020-02-20 Data processing method and device

Publications (2)

Publication Number Publication Date
CN113282274A CN113282274A (en) 2021-08-20
CN113282274B true CN113282274B (en) 2023-09-22

Family

ID=77274951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010104578.7A Active CN113282274B (en) 2020-02-20 2020-02-20 Data processing method and device

Country Status (1)

Country Link
CN (1) CN113282274B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0403948D0 (en) * 2003-02-20 2004-03-24 Sun Microsystems Inc Method and apparatus for specifying properties using regular expression parameterization
CN108920222A (en) * 2018-07-12 2018-11-30 北京京东金融科技控股有限公司 A kind of method and device for business processing of rule-based engine
CN109032654A (en) * 2017-06-08 2018-12-18 北京京东尚科信息技术有限公司 The method and apparatus of configuration parameter, server and storage medium in the server
WO2019154353A1 (en) * 2018-02-07 2019-08-15 中兴通讯股份有限公司 System running parameter query method, matching method and apparatus, and node device
CN110764768A (en) * 2018-07-26 2020-02-07 北京京东金融科技控股有限公司 Method and device for mutual conversion between model object and JSON object
CN110764769A (en) * 2019-10-21 2020-02-07 苏州思必驰信息科技有限公司 Method and device for processing user request

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10264089B2 (en) * 2014-12-31 2019-04-16 Verizon Patent And Licensing Inc. Rule configuration framework for communication protocols

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0403948D0 (en) * 2003-02-20 2004-03-24 Sun Microsystems Inc Method and apparatus for specifying properties using regular expression parameterization
CN109032654A (en) * 2017-06-08 2018-12-18 北京京东尚科信息技术有限公司 The method and apparatus of configuration parameter, server and storage medium in the server
WO2019154353A1 (en) * 2018-02-07 2019-08-15 中兴通讯股份有限公司 System running parameter query method, matching method and apparatus, and node device
CN108920222A (en) * 2018-07-12 2018-11-30 北京京东金融科技控股有限公司 A kind of method and device for business processing of rule-based engine
CN110764768A (en) * 2018-07-26 2020-02-07 北京京东金融科技控股有限公司 Method and device for mutual conversion between model object and JSON object
CN110764769A (en) * 2019-10-21 2020-02-07 苏州思必驰信息科技有限公司 Method and device for processing user request

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Towards designing effective data persistence through tradeoff space analysis;TANG Chong 等;Proceedings of the 39th international conference on softw are engineering companion;全文 *
利用Ontology和规则表达式的Web信息抽取;张成洪, 王向安, 古晓洪;计算机工程(第05期);全文 *
面向物联网的大数据预警信息高速处理规则引擎;纪佩宇;印杰;武旭红;;计算机与数字工程(第09期);全文 *

Also Published As

Publication number Publication date
CN113282274A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN108920222B (en) Business processing method and device based on rule engine
CN111447257B (en) Message conversion method and device
CN112445868B (en) Service message processing method and device
CN112527649A (en) Test case generation method and device
CN111427701A (en) Workflow engine system and business processing method
CN110858202A (en) Method and device for generating where clause in database query statement
CN110795315A (en) Method and device for monitoring service
CN111666293A (en) Database access method and device
CN113076153B (en) Interface calling method and device
CN110706093A (en) Accounting processing method and device
CN112653614A (en) Request processing method and device based on message middleware
CN112685481B (en) Data processing method and device
CN113541987A (en) Method and device for updating configuration data
CN113282274B (en) Data processing method and device
CN113760274B (en) Front-end assembly logic injection method and device
CN114666319A (en) Data downloading method and device, electronic equipment and readable storage medium
CN112099841A (en) Method and system for generating configuration file
CN113779018A (en) Data processing method and device
CN111984616A (en) Method, device and system for updating shared file
CN110858240A (en) Front-end module loading method and device
CN113760886B (en) Method, apparatus, device and computer readable medium for providing data service
CN114202046B (en) Method, device, equipment and medium for generating two-dimension code based on SAP system
CN113495747B (en) Gray scale release method and device
CN111736805B (en) Method and device for processing Excel table
CN115470245A (en) Data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant