CN113282274A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN113282274A
CN113282274A CN202010104578.7A CN202010104578A CN113282274A CN 113282274 A CN113282274 A CN 113282274A CN 202010104578 A CN202010104578 A CN 202010104578A CN 113282274 A CN113282274 A CN 113282274A
Authority
CN
China
Prior art keywords
data processing
parameters
expression
plug
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010104578.7A
Other languages
Chinese (zh)
Other versions
CN113282274B (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

Images

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: 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 the data processing rule set through the plug-in and the rule resolver, and determining first parameters corresponding to the expressions; and screening the first parameters to obtain second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations corresponding to the key values. According to the embodiment, the plug-in and the rule resolver are utilized, the expression is matched to obtain different key values of the same parameter key, additional judgment logic is not needed, the acquisition parameter and the judgment logic are executed by the plug-in, and 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
Currently, a judgment logic needs to be added to a system in order to add corresponding parameters for a new data processing rule. For example, the package label module prints if the merchant is a, otherwise, the package label module does not print, for example, if the merchant prints as "a", the else does not print.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems: when a data processing rule is added, namely a judgment logic code needs to be set in a module and the module is online, system codes are more and more bloated, the safety performance of the system is influenced, and the maintenance difficulty of the system is increased.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data processing method and apparatus, which can at least solve the problem in the prior art that a system code is bloated due to a manner of adding a judgment logic code to a 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 an expression corresponding to the attribute name and the attribute value in a data processing rule set through a plug-in and a rule resolver, and determining a first parameter corresponding to the expression;
and screening the first parameters to obtain second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations corresponding to the key values.
Optionally, before the receiving the data processing request, the method further includes: and introducing the plug-in to respond to the starting of the data processing system, calling the plug-in from an interface of a configuration center, and pulling all data processing rules into a storage unit of the data processing system.
Optionally, before invoking the plug-in from the interface of the configuration center in response to the startup of the data processing system and pulling all the data processing rules into the storage unit of the data processing system, the method further includes:
performing expression and parameter setting on the data processing rule in the configuration center;
receiving information configuration of the attribute name and the attribute value in the expression to obtain a configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
and generating a configured data processing rule based on the configured expression and the configured parameter.
Optionally, matching, by the plug-in and the rule parser, the expression corresponding to the attribute name and the attribute value 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 resolver.
To achieve the above object, according to another aspect of the embodiments 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 matching an expression corresponding to the attribute name and the attribute value in the data processing rule set through a plug-in and a rule resolver and determining a first parameter corresponding to the expression;
and the data processing module is used for screening the first parameters, obtaining second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations corresponding to the key values.
Optionally, the system further includes a rule pulling module, configured to: and introducing the plug-in to respond to the starting of the data processing system, calling the plug-in from an interface of a configuration center, and pulling all data processing rules into a storage unit of the data processing system.
Optionally, the system further includes a rule configuration module, configured to:
performing expression and parameter setting on the data processing rule in the configuration center;
receiving information configuration of the attribute name and the attribute value in the expression to obtain a configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
and generating a configured data processing rule based on the configured expression and the configured parameter.
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 resolver.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a data processing electronic device.
The electronic device of the embodiment of the invention comprises: one or more processors; a storage device, configured to store 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 embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program implementing any of the data processing methods described above when executed by a processor.
According to the scheme provided by the invention, one embodiment of the invention has the following advantages or beneficial effects: the problem that codes are frequently modified when data processing rules are added in the prior art is solved, and only the expression of the message field and the parameters corresponding to the expression are configured in the configuration center. The data processing system analyzes and matches the expression which accords with the corresponding field content of the message context through the plug-in, obtains the corresponding parameter, and does not judge the logic code through if else to obtain, thereby integrally and greatly reducing the number of times and the amount of modification of the code, reducing the online risk of the system and accelerating the iteration speed of data processing.
Further effects of the above-mentioned non-conventional alternatives will be 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 main flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating an alternative data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic overall framework diagram of an embodiment of the invention;
FIG. 4 is a schematic diagram of the main blocks 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 employed;
FIG. 6 is a schematic block diagram of a computer system suitable for use with a mobile device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as 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 according to an embodiment of the present invention is shown, which includes 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 an expression corresponding to the attribute name and the attribute value in a data processing rule set through a plug-in and a rule resolver, and determining a first parameter corresponding to the expression;
s103: and screening the first parameters to obtain second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations 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, and the request usually carries user personal information and a requirement, for example, a merchant needs to print for a. The "business is a" is usually stored in a message (service message), and the requirement is stored in a key name of a parameter, such as SELLER _ PRINT.
Taking the specific code as an example:
Figure BDA0002388106650000051
wherein, paramRequest is a parameter, order is a message, and getParamResult is a method for acquiring the parameter.
The message refers to data content to be transmitted between different system modules, is usually in json format, and is composed of an attribute name and an attribute value. For the above example, "the merchant is a and needs to print" the merchant is the attribute name and a is the attribute value. The determination of the attribute name and the attribute value is determined by the setting format in the message.
For example, the messages { "orgNo": 6"," distributeNo ": 6", "warehouseNoo": 80"," seller ": A" } contain four attribute names, which are respectively:
orgNo: organization number
distributote No: distribution center numbering
warthouse eno: storehouse number
self: business company
The corresponding attribute values are 6, 80 and a, respectively.
For step S102, after receiving the request parameter, an 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 to match an expression that conforms to the field content of the current message, and further obtains a parameter corresponding to the expression, that is, a first parameter, and returns the parameter to the data processing system.
The rule resolver can match whether the expression is correct according to the attribute name and the attribute value in the provided message, for example, the message is in a json format, and if the content is ' seller ': A ', the rule resolver conforms to the expression format and can match.
Currently, there are many open source rule resolvers in the market, such as QLExpress, by which parameters and expressions that meet the conditions of the data processing rules can be matched.
For step S103, the corresponding number of expressions may not be unique for the same attribute name and attribute value, so that multiple expressions and corresponding first parameters may be obtained. Even if the data processing request includes a plurality of service requirements, the actions thereof still need to be executed 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 with the key value in the second parameter, namely finishing the processing action of the data processing request.
In addition, when the data processing system acquires the parameters, the message is usually converted into a map set, and then an API (application program interface) of the plug-in is called to acquire key values corresponding to the key names in the parameters by combining the parameter keys; the Map is a set type, the format is generally a key-value form, and the message entity can be converted into the Map format for conveniently carrying out expression matching.
The method provided by the embodiment introduces the plug-in and the rule resolver, and defines the expression of the parameter by using the message field. The method solves the problem that the system code needs to be modified when a new data processing rule is added, does not need to add extra judgment logic, and obtains the parameters and the judgment logic which are executed by the plug-in, thereby reducing the service pressure of the data processing system, reducing the modification times and the modification quantity of the code, reducing the online risk and accelerating the iteration speed of the service.
Referring to fig. 2, a schematic flow chart of an alternative data processing method according to an embodiment of the present invention is shown, including the following steps:
s201: performing expression and parameter setting on a data processing rule in a configuration center;
s202: receiving information configuration of the attribute name and the attribute value in the expression to obtain a configured expression;
s203: receiving information configuration of key names and key values in the parameters to obtain configured parameters;
s204: generating a configured data processing rule based on the configured expression and the configured parameter;
s205: introducing a plug-in to respond to the starting of the data processing system, calling the plug-in from an interface of a configuration center, and pulling all data processing rules into a storage unit 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 an expression corresponding to the attribute name and the attribute value in a data processing rule set through a plug-in and a rule resolver, and determining a first parameter corresponding to the expression;
s208: and screening the first parameters to obtain second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations corresponding to the key values.
In the above embodiment, for the steps S206 to S208, reference may be made to the descriptions of the steps S101 to S103 shown in fig. 1, and the description is not repeated here.
In the above embodiment, for steps S201 to S204, if a new data processing rule needs to be added, the present invention first needs to configure in a configuration center, configure an expression corresponding to a message field, and a parameter corresponding to the expression.
For example, when the merchant is determined to be a, the operation of printing "×" delivery "is performed, and two expressions and two parameters need to be configured:
the expression is: the value is "× delivery";
expression is: self! The key of the corresponding parameter is SELLER _ PRINT, and the corresponding value is "Null".
It should be noted that the above examples are only examples, and in actual operations, for the same data processing rule, the corresponding expression may be other values, for example, one, two, three, or even multiple values, which are specifically set by a worker.
For step S205, after the configuration center configures the expressions and parameters of the data processing rules, the data processing system introduces a plug-in, so that all the data processing rules in the configuration center are pulled 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 in consideration of faster local cache reading.
It should be noted that the existing solution requires the system to autonomously pull the data processing rules from the interface of the configuration center. The invention introduces the plug-in, and transfers the parameter introduction pressure to the plug-in, thereby reducing the service pressure of the data processing system.
In addition, the plug-in is called to pull the rule again from the interface of the configuration center every time the data processing system is restarted, but when the system is not restarted or closed, the parameters of the rule are always stored in the local cache, and the cache time can be set by a worker.
According to the method provided by the embodiment, the data processing rule can be customized according to the service requirement, and parameters can be distinguished through different expressions.
Referring to fig. 3, there is shown an overall framework diagram 300 of the present invention, which includes the following four components, and with the increase of service complexity, in the same system/module, different parameters need to be obtained according to different service/data processing requests:
data processing system: systems for handling specific services, such as systems for printing package labels for warehouses, packaging systems, and the like;
plug-in components: and providing the parameters to the client side for acquiring the parameters in a jar package mode, so as to pack the plug-in into the project. The functions of the device mainly comprise: and (3) extracting expressions and parameters in the data processing rule from the configuration center, calling a rule resolver to match the expressions and return the parameters, performing local cache and the like.
Third, the rule resolver: whether the expression is correct or not can be matched according to the attribute name and the attribute value in the provided message;
fourthly, configuring a center: the parameters can be configured and persisted into the database, and an interface for acquiring the parameters is provided for the plug-in to call. The plug-in is a bridge between the data processing system and the configuration center, the relationship between the data processing system and the configuration center is well decoupled, and the plug-in encapsulates functions such as a rule resolver and a cache.
The method provided by the embodiment of the invention solves the problem that the existing data processing rule is increased and the code needs to be frequently modified, 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 which accords with the corresponding field content of the message context through the plug-in, obtains the corresponding parameter, and does not judge the logic code through if else to obtain, thereby integrally and greatly reducing the modification amount 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 match, in the data processing rule set, an expression corresponding to the attribute name and the attribute value through a plug-in and a rule parser, and determine a first parameter corresponding to the expression;
the data processing module 403 is configured to filter the first parameter, obtain a second parameter corresponding to the parameter key name, and determine a key value in the second parameter, so as to execute a data processing operation corresponding to the key value.
The apparatus further includes a rule pull module 404 (not shown) for: and introducing the plug-in to respond to the starting of the data processing system, calling the plug-in from an interface of a configuration center, and pulling all data processing rules into a storage unit of the data processing system.
The apparatus further includes a rule configuration module 405 (not shown) for:
performing expression and parameter setting on the data processing rule in the configuration center;
receiving information configuration of the attribute name and the attribute value in the expression to obtain a configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
and generating a configured data processing rule based on the configured expression and the configured parameter.
In the device for implementing 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 resolver.
In addition, the detailed implementation of the device in the embodiment of the present invention has been described in detail in the above method, so that the repeated description is not repeated here.
Fig. 5 illustrates an exemplary system architecture 500 to which embodiments of the 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 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping 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 executed 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, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that 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 necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via 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, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; 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 driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the 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 illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present invention, 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, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 flowchart 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 described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a request receiving module, a parameter determining module and a data processing module. The names of the modules do not limit the modules themselves in some cases, and for example, a data processing module may also be described as a "module that performs data processing according to key values".
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 separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
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 an expression corresponding to the attribute name and the attribute value in a data processing rule set through a plug-in and a rule resolver, and determining a first parameter corresponding to the expression;
and screening the first parameters to obtain second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations corresponding to the key values.
According to the technical scheme of the embodiment of the invention, the problem that the existing data processing rule is increased and the code needs to be frequently modified is solved, 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 which accords with the corresponding field content of the message context through the plug-in, obtains the corresponding parameter, and does not judge the logic code through if else to obtain, thereby integrally and greatly reducing the modification amount of the code, reducing the online risk of the system and accelerating the iteration speed of data processing.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A data processing method, comprising:
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 an expression corresponding to the attribute name and the attribute value in a data processing rule set through a plug-in and a rule resolver, and determining a first parameter corresponding to the expression;
and screening the first parameters to obtain second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations corresponding to the key values.
2. The method of claim 1, prior to said receiving a data processing request, further comprising:
and introducing the plug-in to respond to the starting of the data processing system, calling the plug-in from an interface of a configuration center, and pulling all data processing rules into a storage unit of the data processing system.
3. The method of claim 2, further comprising, before invoking the plug-in to pull all data processing rules from an interface of a configuration center into a storage unit of the data processing system in response to a startup of the data processing system:
performing expression and parameter setting on the data processing rule in the configuration center;
receiving information configuration of the attribute name and the attribute value in the expression to obtain a configured expression; and
receiving information configuration of key names and key values in the parameters to obtain configured parameters;
and generating a configured data processing rule based on the configured expression and the configured parameter.
4. The method of claim 1, wherein matching, via a plug-in and a rule parser, an expression in a data processing rule set corresponding to the attribute name and the attribute value 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 resolver.
5. A data processing apparatus, comprising:
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 matching an expression corresponding to the attribute name and the attribute value in the data processing rule set through a plug-in and a rule resolver and determining a first parameter corresponding to the expression;
and the data processing module is used for screening the first parameters, obtaining second parameters corresponding to the key names of the parameters, and determining key values in the second parameters so as to execute data processing operations corresponding to the key values.
6. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
7. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
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 true CN113282274A (en) 2021-08-20
CN113282274B 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 (7)

* 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
US20160191415A1 (en) * 2014-12-31 2016-06-30 Verizon Patent And Licensing Inc. Rule configuration framework for communication protocols
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
CN110764769A (en) * 2019-10-21 2020-02-07 苏州思必驰信息科技有限公司 Method and device for processing user request
CN110764768A (en) * 2018-07-26 2020-02-07 北京京东金融科技控股有限公司 Method and device for mutual conversion between model object and JSON object

Patent Citations (7)

* 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
US20160191415A1 (en) * 2014-12-31 2016-06-30 Verizon Patent And Licensing Inc. Rule configuration framework for communication protocols
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
TANG CHONG 等: "Towards designing effective data persistence through tradeoff space analysis", PROCEEDINGS OF THE 39TH INTERNATIONAL CONFERENCE ON SOFTW ARE ENGINEERING COMPANION *
张成洪, 王向安, 古晓洪: "利用Ontology和规则表达式的Web信息抽取", 计算机工程, no. 05 *
纪佩宇;印杰;武旭红;: "面向物联网的大数据预警信息高速处理规则引擎", 计算机与数字工程, no. 09 *

Also Published As

Publication number Publication date
CN113282274B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN108920222B (en) Business processing method and device based on rule engine
CN111447257B (en) Message conversion method and device
CN111400061A (en) Data processing method and system
CN110706093A (en) Accounting processing method and device
CN112445868B (en) Service message processing method and device
CN110795315A (en) Method and device for monitoring service
CN113031946A (en) Method and device for rendering page component
CN113626223A (en) Interface calling method and device
CN110109983B (en) Method and device for operating Redis database
CN111881392A (en) Page display method and device
CN113076153A (en) Interface calling method and device
CN110705271B (en) System and method for providing natural language processing service
CN111767498A (en) Method and device for realizing file information sharing
CN110764768A (en) Method and device for mutual conversion between model object and JSON object
CN113760240B (en) Method and device for generating data model
CN113282274A (en) Data processing method and device
CN116263690A (en) Method and device for virtual machine to read data from external system and relevant written data
CN113312900A (en) Data verification method and device
CN112099841A (en) Method and system for generating configuration file
CN112905273A (en) Service calling method and device
CN113448960A (en) Method and device for importing form file
CN113779018A (en) Data processing method and device
CN113778501B (en) Code task processing method and device
CN111062682B (en) Work order processing method and device
CN114202046B (en) Method, device, equipment and medium for generating two-dimension code based on SAP system

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