CN115936413A - Service request method, system, storage medium and terminal equipment - Google Patents

Service request method, system, storage medium and terminal equipment Download PDF

Info

Publication number
CN115936413A
CN115936413A CN202110935484.9A CN202110935484A CN115936413A CN 115936413 A CN115936413 A CN 115936413A CN 202110935484 A CN202110935484 A CN 202110935484A CN 115936413 A CN115936413 A CN 115936413A
Authority
CN
China
Prior art keywords
service
quantization
request
rule
service request
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.)
Pending
Application number
CN202110935484.9A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110935484.9A priority Critical patent/CN115936413A/en
Publication of CN115936413A publication Critical patent/CN115936413A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a service request method, a service request system, a storage medium and terminal equipment, which are applied to the technical field of information processing. The service request system converts the service data of multiple dimensions in the service request into a first quantization set according to a preset quantization strategy of service conditions, determines a second quantization set of the service rule corresponding to the service request, and outputs a service operation result corresponding to the service rule when the second quantization set belongs to a subset of the first quantization set. Therefore, the calculation of hit of various complex business rules in a business scene can be converted into the calculation among data sets, the calculation of the business rules is greatly simplified, the calculation in the process of business request is further simplified, and the resource consumption of the business request is reduced.

Description

Service request method, system, storage medium and terminal equipment
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a service request method, a service request system, a storage medium, and a terminal device.
Background
The rule service is a service for returning corresponding content (namely a target) to a calling party according to a defined rule, and is widely applied to scenes such as internet of things (Next Generation Network, NGN), security, banks, energy, education and the like.
In the rule service, a rule is composed of a plurality of conditional operations, if the condition is satisfied, the rule is hit, and a target hit by the rule is returned, in an actual business scenario, the number of the rule and the condition is large, and when whether the rule is hit is judged, two ways are generally available: one is to run each condition in each rule once, so that the calculation amount and the time consumption are large; another is to use a tree to store the matching result, which has a problem of explosion of the result space, for example, if a service has 9 conditions, the result space has 9 powers of 3, i.e. 19683 cases, and thus, the conventional rule operation requires a large amount of operations or cache space, and the performance is poor.
Disclosure of Invention
Embodiments of the present invention provide a service request method, a service request system, a storage medium, and a terminal device, which implement simplified service rule calculation in a service request process.
The embodiment of the invention provides a service request method, which comprises the following steps:
receiving a service request, wherein the service request comprises: business data of multiple dimensions;
determining a service rule corresponding to the request type of the service request according to the service request, wherein the service rule comprises a plurality of service conditions;
converting the service data of the multiple dimensions into a first quantization set according to a preset quantization strategy of service conditions, and determining a second quantization set corresponding to the service conditions in the service rule;
and when the second quantization set belongs to the subset of the first quantization set, outputting the service request content corresponding to the service rule.
Another aspect of the embodiments of the present invention provides a service request system, including:
a request receiving unit, configured to receive a service request, where the service request includes: business data of multiple dimensions;
a rule determining unit, configured to determine, according to the service request, a service rule corresponding to a request type of the service request, where the service rule includes a plurality of service conditions;
the aggregation unit is used for converting the service data of the multiple dimensions into a first quantization set according to a preset quantization strategy of service conditions and determining a second quantization set corresponding to the multiple service conditions in the service rule;
and the content output unit is used for outputting the service request content corresponding to the service rule when the second quantization set belongs to the subset of the first quantization set.
In another aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a plurality of computer programs, where the computer programs are adapted to be loaded by a processor and execute the service request method according to an aspect of the embodiment of the present invention.
In another aspect, an embodiment of the present invention further provides a terminal device, including a processor and a memory;
the memory is used for storing a plurality of computer programs, and the computer programs are used for being loaded by the processor and executing the service request method according to the aspect of the embodiment of the invention; the processor is configured to implement each of the plurality of computer programs.
It can be seen that, in the method of this embodiment, the service request system converts the service data of multiple dimensions in the service request into the first quantization set according to the quantization policy of the preset service condition, determines the second quantization set of the service rule corresponding to the service request, and outputs the service operation result corresponding to the service rule when the second quantization set belongs to the subset of the first quantization set. Therefore, the calculation of hit of various complex business rules in a business scene can be converted into the calculation among data sets, the calculation of the business rules is greatly simplified, the calculation in the process of business request is further simplified, and the resource consumption of the business request is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a service request method according to an embodiment of the present invention;
fig. 2 is a flowchart of a service request method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of business rules, business conditions and objectives in an NGN scenario in an application embodiment of the present invention;
FIG. 4 is a diagram illustrating business rules, business conditions, and goals in a software upgrade scenario in an exemplary embodiment of the present invention;
fig. 5 is a flowchart of a service request method provided by an application embodiment of the present invention;
FIG. 6 is a diagram of two quantization sets in an embodiment of the present invention;
fig. 7 is a flowchart of another service request method provided by an application embodiment of the present invention;
fig. 8 is a schematic diagram of a distributed system to which a service request method is applied in another application embodiment of the present invention;
FIG. 9 is a block diagram illustrating an exemplary block structure according to another embodiment of the present invention;
fig. 10 is a schematic logical structure diagram of a service request system according to an embodiment of the present invention;
fig. 11 is a schematic logical structure diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the present invention provides a service request method, which can be applied to any application requiring a rule service, as shown in fig. 1, a service request system can implement a service request according to the following steps:
receiving a service request, wherein the service request comprises: business data of multiple dimensions; determining a service rule corresponding to the request type of the service request according to the service request, wherein the service rule comprises a plurality of service conditions; converting the service data of the multiple dimensions into a first quantization set according to a preset quantization strategy of service conditions, and determining a second quantization set corresponding to the service conditions in the service rule; and when the second quantization set belongs to the subset of the first quantization set, outputting the service request content corresponding to the service rule.
Therefore, the calculation of hit of various complex business rules in a business scene can be converted into the calculation among data sets, the calculation of the business rules is greatly simplified, the calculation in the process of business request is further simplified, and the resource consumption of the business request is reduced.
In practical application, the service request system to which the method of the embodiment of the present invention is applied may be a system of a cloud technology. The Cloud technology (Cloud technology) is a generic term of a network technology, an information technology, an integration technology, a management platform technology, an application technology and the like applied based on a Cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. The cloud computing technology becomes an important support, and background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the internet industry, each article may have an own identification mark and needs to be transmitted to a background system for logic processing, data of different levels can be processed separately, and various industry data need strong system background support and can be realized only through cloud computing.
An embodiment of the present invention provides a service request method, which is a method executed by a service request system, and a flowchart is shown in fig. 2, where the method includes:
step 101, receiving a service request, wherein the service request comprises: business data of multiple dimensions.
It can be understood that the service request may be initiated by the user through the service terminal, and then the service request system may initiate the process of this embodiment.
In a specific application, the service request system may be applied to a service terminal, so that when a user initiates a service request through the service terminal, the service terminal executes the service request process of this embodiment; in another specific application, the service request system is applied to a service server, so that when a user initiates a service request through a service terminal and sends the service request to the service server, the service server executes the service request process of this embodiment.
Wherein, a service represents an application scenario, and a service request is a request in an application scenario, for example: the service request of the service of 'software package upgrade' is used for requesting a software upgrade package corresponding to the information such as the current software version number, the type of equipment and the like; the service data of multiple dimensions carried in the service request may include current state information when the service terminal initiates the service request, such as a current version number of the service terminal and a network protocol address of the service terminal, and may also include user information, such as that the user belongs to a customer service department.
Step 102, determining a service rule corresponding to the request type of the service request according to the service request, wherein the service rule comprises a plurality of service conditions. One service request can correspond to one or more service rules, and the service rules are preset in a service request system and can be continuously updated according to actual conditions.
Specifically, different types of service requests may correspond to different service rules, and in one case, a first corresponding relationship between a request type of a service request and a service rule may be preset in a service request system, so that, after a service request is received, a service rule corresponding to the request type of the received service request may be searched from the preset first corresponding relationship.
In another case, the service request system may preset a second corresponding relationship between each service rule and the target in advance, where one service rule may include a plurality of service conditions, and when the service request system initiates the process of this embodiment, a target matching the content requested by the service request may be first searched from the second corresponding relationship, and then the service rule corresponding to the searched target is used as the service rule corresponding to the service request. One request type corresponds to one content requested by the service request, for example, the content requested by the service request corresponding to the request type of "internet policy delivery" includes: and the internet access policy is, for example, direct connection or connection through a certain access point.
The business rules refer to logic of whether a target can be matched, that is, "what condition can be matched to the target", and multiple business rules can be associated with a target under a business, that is, any one of the multiple business rules is matched, which will result in the return of the target. A business rule consists of a series of business conditions executed in a chain (condition A → condition B → condition C), and the business rule hits when all the business conditions are satisfied.
The returned target refers to the content returned to the service requester (i.e. the caller) under a certain service. For example: in an NGN scene, the target in the service of ' internet strategy issue ' is ' internet strategy ', which is similar to ' tls smart gate. direct "such an entry; another example is: in the software upgrade scenario, the target in the "software package upgrade" is the "software upgrade package". The target may also be an Identity (ID) to the final product, such as "internet policy ID" or "software upgrade package ID", and a specific service requester may map to a specific product according to the returned ID, and the targets of the same service have priority.
Business conditions are entries that constitute business rules, a business rule consisting of one or more sequentially executed business conditions. For example, in an NGN scenario, a "internet access scenario" is an "intranet scenario" and is a condition, and for example, in a software upgrade scenario, a "version number" is also a service condition from "4.1.4" to "4.1.6".
The business rule may be represented by a quantization identifier corresponding to each of the plurality of business conditions, and the target may also be represented by a corresponding quantization identifier, where the quantization identifier refers to data, such as numbers or other characters, that quantizes an actual object, such as the business rule, the business condition, or the target.
In specific implementation, cloud storage may be adopted when the business rule, the business condition, the target and the quantization identifier corresponding to the target are preset. The distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system which integrates a large number of storage devices (storage devices are also referred to as storage nodes) of various types in a network through application software or application interfaces to cooperatively work through functions such as cluster application, grid technology, distributed storage file system and the like, and provides data storage and service access functions to the outside.
At present, a storage method of a storage system is as follows: logical volumes are created, and when created, each logical volume is allocated physical storage space, which may be the disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, that is, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as data identification (ID, ID entry), the file system writes each object into a physical storage space of the logical volume, and the file system records storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
The process of allocating physical storage space for the logical volume by the storage system specifically includes: physical storage space is divided in advance into stripes according to a group of capacity measures of objects stored in a logical volume (the measures often have a large margin with respect to the capacity of the actual objects to be stored) and Redundant Array of Independent Disks (RAID), and one logical volume can be understood as one stripe, thereby allocating physical storage space to the logical volume.
Step 103, according to a preset quantization strategy of the service conditions, converting the service data of multiple dimensions into a first quantization set, and determining a second quantization set corresponding to multiple service conditions in the service rule.
The first quantization set is a data set obtained by quantizing service data of each dimension, and an element in the first quantization set is a quantization representation of the service data of each dimension, and specifically, the service request system sets at least one corresponding quantization identifier, such as a specific numerical value or a specific character, for the service data of each dimension, so that the quantization identifiers corresponding to the service data of multiple dimensions respectively form the first quantization set. In the service request system, a plurality of quantization identifiers of the service conditions are preset in advance, and the quantization identifiers of the service conditions are obtained according to a certain quantization strategy, for example, a quantization identifier corresponding to a parameter a in a certain value range is specifically a number.
Specifically, when the service request system sets a quantization identifier for service data of a dimension, the quantization identifier in the first quantization set may be set according to a value range of a parameter related to the service data of the dimension and in combination with a quantization identifier of each service condition preset locally in the service request system, specifically: when a certain service condition is consistent with the value range of the parameter related to the service data of a dimension, the quantization identifier set for the service data of the dimension is the quantization identifier of the service condition.
And the service request system can set a plurality of quantization identifiers for the service data of a dimension, and specifically, how many quantization identifiers to set need to be determined based on the quantization identifiers of the service conditions preset in the service request system, and specifically, if the service data of a dimension relates to a parameter, and a service conditions in the preset service conditions are conditions based on parameter values of the parameter, then a quantization identifier can be set for the service data of the dimension.
For example: the preset service conditions in the service request system include two service conditions based on a parameter "network scenario", that is, "service condition 1-network scenario is intranet" and "service condition 2-network scenario is extranet scenario", and if the service data included in the service request is intranet scenario, the quantization identifier that can be set for the service data is: 1 and 2 (here-means not) two quantization indices.
The second quantization set is a data set obtained by quantizing each service condition in the service rule, and elements in the second quantization set are quantized representations of each service condition. Specifically, if the service data of any dimension and a certain service condition are in the same value range for the same parameter, the same quantization identifier is set for the service data of the dimension and the service condition. The second quantized set may be preset in the service request system, and may be obtained directly from the local storage when the service request is initiated.
For example, if the service data of one dimension is "the client version number is 3.0.4.523", and the service condition is "the client version number >3.0.4.500", both of which belong to the same value range, the same quantization flag is set for the service data and the service condition, for example, both are 3.
And step 104, when the second quantization set belongs to the subset of the first quantization set, it indicates that the service request hits the service rule corresponding to the second quantization set, and outputs the service request content corresponding to the service rule, where the service request content is specifically a target returned to the service requester based on the service rule in the rule service, and may be an actual object requested by the service request, or an ID of the requested actual object, and the like.
If the service rule corresponding to the service request has a plurality of service rules, when the service request content is output, when the second quantization set corresponding to at least one of the plurality of service rules respectively belongs to the subset of the first quantization set, the service request content corresponding to at least one of the service rules is output. Wherein, when the service request hits at least one service rule, a service request content can be output.
When the second quantization set corresponding to the plurality of service rules respectively belongs to the subset of the first quantization set, determining the priority of the service request content corresponding to the plurality of service rules respectively, and then sequentially outputting the service request content corresponding to the plurality of service rules respectively according to the determined priority or only outputting the service request content with the highest priority. When determining the priority, the following situations may be specifically included but not limited to:
and if a second quantization set is a subset of another second quantization set in the second quantization sets respectively corresponding to the plurality of business rules, determining that the priority of the business request content of the business rule corresponding to the another second quantization set is higher than the priority of the business request content of the business rule corresponding to the one second quantization set. In this case, only the service request contents having higher priority may be output.
If a second quantized set 1 and another second quantized set 2 in the second quantized sets respectively corresponding to a plurality of business rules have an intersection, the number of elements in the intersection is greater than a certain threshold, and the number of elements in another second quantized set 2 is greater than the number of elements in one second quantized set 1, it is determined that the priority of the business request content of the business rule corresponding to another second quantized set 2 is higher than the priority of the business request content of the business rule corresponding to one second quantized set 1. In this case, the service request contents corresponding to the plurality of service rules may be sequentially output according to the determined priority.
It can be seen that, in the method of this embodiment, the service request system converts the service data of multiple dimensions in the service request into a first quantization set according to a quantization policy of a preset service condition, determines a second quantization set of the service rule corresponding to the service request, and outputs a service operation result corresponding to the service rule when the second quantization set belongs to a subset of the first quantization set. Therefore, the calculation of hit of various complex business rules in a business scene can be converted into the calculation among data sets, the calculation of the business rules is greatly simplified, the calculation in the process of business request is further simplified, and the resource consumption of the business request is reduced.
The service request method of the present invention is described below with a specific application example, and the method of the present embodiment may be applied to a plurality of different scenarios, for example: in the application scenario of NGN, a corresponding internet access policy is mainly returned to the service requester by hitting a service rule, and the service rule, the service condition, and the target (i.e., the content of the service request) may be as shown in fig. 3; in the application scenario of software upgrade, a corresponding software package is mainly returned to the service requester through the hit of the service rule, and the service rule, the service condition, and the target may be as shown in fig. 4.
The following describes the service request method of the present invention by taking an NGN application scenario as an example, and a flowchart is shown in fig. 5, which includes:
step 201, presetting a service rule, a service condition and a target in a service request system in advance, and storing quantization identifiers corresponding to the service rule, the service condition and the target respectively in the service request system.
For example, a target 1, namely a policy a, may be set, specifically, an intranet is connected through a default access point; target 2, policy B, specifically direct connection; and a target 3, namely a strategy C, specifically connecting the intranet through the Shenzhen access point.
The service condition 1 can be set specifically that the network scene is an intranet scene; the service condition 2 is specifically that the network scene is an external network scene; the service condition 3 is specifically a client version number >3.0.4.500; the service condition 4 is that the user belongs to the infrastructure center; the business condition 5 is that the user belongs to the IT department of the enterprise; the service condition 6 is that the source IP belongs to the Shenzhen workplace; the service condition 7 is that the source IP belongs to a sensitive development network.
The business rule 1 can be set to be specifically a strategy A returned when the user meeting the intranet scene and the client version number >3.0.4.500 is satisfied; the business rule 2 is specifically that when the requirement of the user of the external network scene and the source IP belonging to the Shenzhen workplace is met, a strategy B is returned; the business rule 3 is specifically the return policy C when meeting the intranet scenario, the client version number >3.0.4.500 and the source IP of the user belonging to the Shenzhen workplace. Meanwhile, second quantization sets corresponding to the respective business rules may be stored, for example, the second quantization set corresponding to the business rule 1 is [ 1,3 ], and corresponds to the target 1; the second quantization set corresponding to the business rule 2 is [ 2,6 ] and corresponds to the target 2; the second quantization set corresponding to business rule 3 is [ 1,3,6 ] and corresponds to object 3.
Step 202, a user initiates a service request through a service terminal, where the service request is used to request to issue an internet access policy, and the service request carries service data with multiple dimensions, which may specifically include: the intranet scene, the client version number 3.0.4.523, the user being the infrastructure center, the source IP being in Shenzhen place, and the like.
In an NGN scenario, the service terminal may be an NGN agent (NGN agent) or an Intelligent Office Automation system (IOA), and the service request system is applied to the server in this embodiment.
Step 203, the service request system determines a corresponding service rule according to the service request, the service rule includes a plurality of service conditions, and determines a second quantization set corresponding to the service conditions in the service rule. For example, it is determined that the service request corresponds to service rule 1 and service rule 3, and the corresponding second quantization sets are [ 1,3 ] and [ 1,3,6 ], respectively.
Step 204, converting the service data of multiple dimensions in the service request into a first quantization set, which may be specifically [ 1 ], -2,3,4,5,6 ], -7 ], where "-" indicates not.
Step 205, if the determined second quantization sets [ 1,3 ] and [ 1,3,6 ] belong to subsets of the first quantization set, for example, as shown in fig. 6, and the two second quantization sets correspond to the service request contents with the service rules of 1 and 3, respectively, then correspondingly return the target 1 and the target 3 to the service terminal, and the service terminal may select the service request content with the highest priority and control forwarding of traffic based on the selected service request content.
Or, the service request system may determine the priorities of the service request contents respectively corresponding to the two second quantized sets, and only return the service request contents with higher priorities to the service terminal, so that data traffic between the service request system and the service terminal may be saved.
The following describes the service request method of the present invention by taking a software upgrade application scenario as an example, and a flowchart is shown in fig. 7, where the method includes:
step 301, presetting a corresponding relationship between a service rule for software upgrade and a target in a service request system in advance, where one service rule may include a plurality of service conditions, and each service condition may be represented by a corresponding quantization identifier.
For example, target 1 may be a software package specifically returning to the android system, target 2 may be a software package specifically returning to the apple system, and target 3 may be a software package returning to the computer version. In addition, the service condition 1 may be set to specifically set that the software version number is between 4.1.4 and 4.1.6, the service condition 2 may be set to specifically set that the device type is an apple mobile phone, the service condition 3 may be set to specifically set that the device type is an android mobile phone, and the service condition 4 may be set to specifically set that the device type is a computer.
Further, the business rule 1 may be set to specifically be that when the software version number is between 4.1.4 and 4.1.6 and the device type is an android phone, the target 1 is executed; the business rule 2 is specifically that when the software version number is between 4.1.4 and 4.1.6 and the device type is an apple mobile phone, the target 2 is executed; target 3 is executed when the software version number is between 4.1.4 and 4.1.6 and the device type is a computer. Meanwhile, second quantization sets corresponding to the respective business rules may be stored, for example, the second quantization set corresponding to the business rule 1 is [ 1,3 ], and corresponds to the target 1; the second quantization set corresponding to the business rule 2 is [ 1,2 ] and corresponds to the target 2; the second quantization set corresponding to business rule 3 is [ 1,4 ], and corresponds to target 3.
Step 302, a user initiates a service request, specifically, a software upgrade request, through a service terminal, where the software upgrade request is used to request a software package, and the software upgrade request carries service data of multiple dimensions, which may specifically include service data of multiple dimensions, for example, a version number of software in current equipment is 4.1.5 and a type of the current equipment is an apple mobile phone.
Step 303, the service request system determines a corresponding service rule according to the software upgrade request, where the service rule includes a plurality of service conditions, and determines a second quantization set corresponding to the service conditions in the service rule. For example, it is determined that the software upgrade request corresponds to business rule 1, business rule 2, and business rule 3, and the corresponding second quantization sets are [ 1,3 ], [ 1,2 ], and [ 1,4 ], respectively.
Step 304, converting the service data of multiple dimensions in the software upgrading request into a first quantization set, which may be [ 1,2, — 3, — 4 ], where "-" represents not.
Step 305, if the determined second quantization set [ 1,2 ] belongs to the subset of the first quantization set, and this second quantization set corresponds to the target 2 of the service rule 2, the target 2 is correspondingly executed, that is, the service request content returned to the service terminal may specifically be a software package of the apple system.
Therefore, the service request method of the embodiment can achieve the following beneficial effects:
(1) The calculation of the hit of the business rule in the business request process is converted into the judgment of the subset in the data set, namely whether the second quantization set belongs to the subset of the first quantization set is judged, so that the problems of huge calculation amount and space explosion are avoided, the calculation complexity is effectively reduced, and the performance is greatly improved.
(2) The embodiment provides a general model of rule service, namely, a plurality of elements, namely, service conditions, targets and the like, are abstracted from a service rule, so that the method can be widely applied to different service scenes and has strong expandability.
In the following, a service request method according to the present invention is described with another specific application example, where a service request system in the embodiment of the present invention is mainly a distributed system 100, and the distributed system may include a client 300 and a plurality of nodes 200 (any form of computing devices in an access network, such as servers and user terminals), and the client 300 and the nodes 200 are connected in a network communication manner.
Taking a distributed system as an example of a blockchain system, referring To fig. 8, which is an optional structural schematic diagram of the distributed system 100 applied To the blockchain system provided in the embodiment of the present invention, the system is formed by a plurality of nodes 200 (computing devices in any form in an access network, such as servers and user terminals) and a client 300, a Peer-To-Peer (P2P) network is formed between the nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or a terminal, can join to become a node, which includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
Referring to the functions of each node in the blockchain system shown in fig. 8, the functions involved include:
1) Routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) The application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization function to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the service implemented by the application includes a code implementing a service request function, which mainly includes:
receiving a service request, wherein the service request comprises: business data of multiple dimensions; determining a service rule corresponding to the request type of the service request according to the service request, wherein the service rule comprises a plurality of service conditions; converting the service data of the multiple dimensions into a first quantization set according to a preset quantization strategy of service conditions, and determining a second quantization set corresponding to the service conditions in the service rule; and when the second quantization set belongs to the subset of the first quantization set, outputting the service request content corresponding to the service rule.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
Referring to fig. 9, an optional schematic diagram of a Block Structure (Block Structure) provided in the embodiment of the present invention is shown, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain. The block may also include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
An embodiment of the present invention further provides a service request system, a schematic structural diagram of which is shown in fig. 10, and the service request system specifically includes:
a request receiving unit 10, configured to receive a service request, where the service request includes: business data of multiple dimensions.
A rule determining unit 11, configured to determine, according to the service request received by the request receiving unit 10, a service rule corresponding to a request type of the service request, where the service rule includes a plurality of service conditions.
A set unit 12, configured to convert the service data with multiple dimensions into a first quantization set according to a preset quantization policy of the service condition, and determine a second quantization set corresponding to multiple service conditions in the service rule determined by the rule determining unit 11.
A content output unit 13, configured to output the service request content corresponding to the service rule when the second quantized set determined by the aggregation unit 12 belongs to the subset of the first quantized set.
When the set unit 12 is converted into the first quantization set, it is specifically configured to set at least one corresponding quantization identifier for the service data of each dimension, and the quantization identifiers corresponding to the service data of multiple dimensions respectively form the first quantization set. When determining the second quantization set, the set unit 12 is specifically configured to set a corresponding quantization identifier for each service condition, where the quantization identifiers corresponding to the multiple service conditions form the second quantization set; when the service data of the dimension and the service condition are in the same value range of the same parameter, the same quantization identifier is set for the service data of the dimension and the service condition.
Further, the service request system of this embodiment may further include: a presetting unit 14, configured to locally preset service conditions and quantization identifiers corresponding to the service conditions; the collecting unit 12 is specifically configured to set at least one corresponding quantization identifier for the service data of each dimension according to a value range of a parameter related to the service data of each dimension and the quantization identifiers corresponding to the service conditions preset by the presetting unit 14, when at least one corresponding quantization identifier is set for the service data of each dimension.
Further, the presetting unit 14 is further configured to preset a corresponding relationship between a business rule and a target, where the business rule is represented by a quantization identifier corresponding to each of a plurality of business conditions; the rule determining unit 11 is specifically configured to determine a target that matches with the content requested by the service request in the correspondence preset by the preset unit 14, and use a service rule corresponding to the determined target as a service rule corresponding to the service request.
Further, the rule determining unit 11 is specifically configured to determine a plurality of corresponding service rules according to the service request; the content output unit 13 is specifically configured to, when the second quantization sets respectively corresponding to at least one of the plurality of business rules all belong to the subset of the first quantization set, output the business request content corresponding to the at least one business rule. In another case, the content output unit 13 is specifically configured to determine, when the second quantization sets corresponding to the multiple service rules respectively all belong to the subset of the first quantization set, priorities of service request contents corresponding to the multiple service rules respectively; and sequentially outputting the service request contents corresponding to the plurality of service rules respectively according to the determined priority, or outputting the service request content with the highest priority.
The content output unit 13, when determining the priority of the service request content corresponding to each of the plurality of service rules, is specifically configured to determine that the priority of the service request content of the service rule corresponding to another second quantization set is higher than the priority of the service request content of the service rule corresponding to the first quantization set if the second quantization set is a subset of another second quantization set in the second quantization sets corresponding to each of the plurality of service rules.
In the system of this embodiment, the aggregation unit 12 converts the service data of multiple dimensions in the service request into a first quantization set according to a quantization policy of a preset service condition, determines a second quantization set of the service rule corresponding to the service request, and when the second quantization set belongs to a subset of the first quantization set, the content output unit 13 outputs a service operation result corresponding to the service rule. Therefore, the calculation of hit of various complex business rules in a business scene can be converted into the calculation among data sets, the calculation of the business rules is greatly simplified, the calculation in the process of business request is further simplified, and the resource consumption of the business request is reduced.
The present invention further provides a terminal device, a schematic structural diagram of which is shown in fig. 11, where the terminal device may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 20 (e.g., one or more processors) and a memory 21, and one or more storage media 22 (e.g., one or more mass storage devices) storing the application programs 221 or the data 222. Wherein the memory 21 and the storage medium 22 may be a transient storage or a persistent storage. The program stored in the storage medium 22 may include one or more modules (not shown), each of which may include a series of instruction operations for the terminal device. Still further, the central processor 20 may be configured to communicate with the storage medium 22 to execute a series of instruction operations in the storage medium 22 on the terminal device.
Specifically, the application program 221 stored in the storage medium 22 includes an application program of a service request, and the program may include the request receiving unit 10, the rule determining unit 11, the aggregating unit 12, the content output unit 13, and the presetting unit 14 in the service request system, which are not described herein again. Further, the central processor 20 may be configured to communicate with the storage medium 22, and execute a series of operations corresponding to the application program of the service request stored in the storage medium 22 on the terminal device.
The terminal equipment may also include one or more power supplies 23, one or more wired or wireless network interfaces 24, one or more input-output interfaces 25, and/or one or more operating systems 223, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
The steps executed by the service request system in the above method embodiment may be based on the structure of the terminal device shown in fig. 11.
In another aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a plurality of computer programs, where the computer programs are adapted to be loaded by a processor and execute the service request method executed by the service request system.
In another aspect, an embodiment of the present invention further provides a terminal device, including a processor and a memory;
the memory is used for storing a plurality of computer programs, and the computer programs are used for being loaded by the processor and executing the service request method executed by the service request system; the processor is configured to implement each of the plurality of computer programs.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the service request method provided in the above-mentioned various alternative implementations.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disk, or the like.
The service request method, system, storage medium and terminal device provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (11)

1. A service request method, comprising:
receiving a service request, wherein the service request comprises: business data of multiple dimensions;
determining a service rule corresponding to the request type of the service request according to the service request, wherein the service rule comprises a plurality of service conditions;
converting the service data of the multiple dimensions into a first quantization set according to a preset quantization strategy of service conditions, and determining a second quantization set corresponding to the service conditions in the service rule;
and when the second quantization set belongs to the subset of the first quantization set, outputting the service request content corresponding to the service rule.
2. The method according to claim 1, wherein the converting the service data of the plurality of dimensions into the first quantization set according to the quantization strategy of the preset service condition specifically includes:
and setting at least one corresponding quantization identifier for the service data of each dimension according to a preset quantization strategy of service conditions, wherein the quantization identifiers corresponding to the service data of multiple dimensions respectively form the first quantization set.
3. The method of claim 2, wherein the method further comprises:
presetting service conditions and quantization marks corresponding to the service conditions locally;
setting at least one corresponding quantization identifier for the service data of each dimension according to a preset quantization strategy of the service condition, specifically including: and setting at least one corresponding quantization identifier for the service data of each dimension according to the value range of the parameter related to the service data of each dimension and the quantization identifiers corresponding to the preset service conditions.
4. The method according to claim 2, wherein the determining the second quantization set corresponding to the plurality of service conditions in the service rule specifically includes:
setting a corresponding quantization identifier for each service condition, wherein the quantization identifiers corresponding to the plurality of service conditions form the second quantization set;
when the service data of the dimension and the service condition are in the same value range of the same parameter, the same quantization identifier is set for the service data of the dimension and the service condition.
5. The method of claim 1, wherein the method further comprises:
presetting a second corresponding relation between a business rule and a target, wherein the business rule comprises a plurality of business conditions;
the determining, according to the service request, a service rule corresponding to the request type of the service request specifically includes:
and searching a target matched with the content requested by the service request in the second corresponding relation, and taking a service rule corresponding to the searched target as a service rule corresponding to the service request.
6. The method according to any one of claims 1 to 5, wherein the determining, according to the service request, the service rule corresponding to the request type of the service request specifically includes: determining a plurality of service rules corresponding to the request type of the service request according to the service request;
when the second quantization set belongs to the subset of the first quantization set, outputting the service request content corresponding to the service rule, specifically including: and when the second quantization set corresponding to at least one of the plurality of business rules respectively belongs to the subset of the first quantization set, outputting the business request content corresponding to the at least one business rule.
7. The method of claim 6,
when the second quantization sets respectively corresponding to the plurality of business rules belong to the subset of the first quantization set, determining the priority of the business request content respectively corresponding to the plurality of business rules; and sequentially outputting the service request contents corresponding to the plurality of service rules respectively according to the determined priority, or outputting the service request content with the highest priority.
8. The method according to claim 6, wherein the determining the priority of the service request content corresponding to each of the plurality of service rules specifically comprises:
and if a second quantization set is a subset of another second quantization set in the second quantization sets respectively corresponding to the plurality of business rules, determining that the priority of the business request content of the business rule corresponding to the another second quantization set is higher than the priority of the business request content of the business rule corresponding to the first quantization set.
9. A service request system, comprising:
a request receiving unit, configured to receive a service request, where the service request includes: business data of multiple dimensions;
a rule determining unit, configured to determine, according to the service request, a service rule corresponding to a request type of the service request, where the service rule includes a plurality of service conditions;
the aggregation unit is used for converting the service data of the multiple dimensions into a first quantization set according to a preset quantization strategy of service conditions and determining a second quantization set corresponding to the service conditions in the service rule;
and the content output unit is used for outputting the service request content corresponding to the service rule when the second quantization set belongs to the subset of the first quantization set.
10. A computer-readable storage medium, characterized in that it stores a plurality of computer programs adapted to be loaded by a processor and to execute the service request method according to any of claims 1 to 8.
11. A terminal device comprising a processor and a memory;
the memory is used for storing a plurality of computer programs for being loaded by the processor and for executing the service request method according to any one of claims 1 to 8; the processor is configured to implement each of the plurality of computer programs.
CN202110935484.9A 2021-08-16 2021-08-16 Service request method, system, storage medium and terminal equipment Pending CN115936413A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110935484.9A CN115936413A (en) 2021-08-16 2021-08-16 Service request method, system, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110935484.9A CN115936413A (en) 2021-08-16 2021-08-16 Service request method, system, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN115936413A true CN115936413A (en) 2023-04-07

Family

ID=86699417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110935484.9A Pending CN115936413A (en) 2021-08-16 2021-08-16 Service request method, system, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN115936413A (en)

Similar Documents

Publication Publication Date Title
CN113094396B (en) Data processing method, device, equipment and medium based on node memory
CN111460504B (en) Service processing method, device, node equipment and storage medium
EP3779692B1 (en) Blockchain data processing
WO2016169237A1 (en) Data processing method and device
CN110910143A (en) Identity identification generation method, device, related node and medium
CN113077259A (en) Block chain-based evidence storing method and device and electronic equipment
CN110321225B (en) Load balancing method, metadata server and computer readable storage medium
CN108399175B (en) Data storage and query method and device
CN108595574B (en) Database cluster connection method, device, equipment and storage medium
US11301436B2 (en) File storage method and storage apparatus
CN117176796A (en) Message pushing method, device, computer equipment and storage medium
CN110708355A (en) File uploading method, system, device and readable storage medium
CN115936413A (en) Service request method, system, storage medium and terminal equipment
CN112001800B (en) Method and device for processing business in block chain system
CN114880300A (en) Processing method and device based on block chain file, processor and electronic equipment
CN109032804B (en) Data processing method and device and server
CN114385596A (en) Data processing method and device
CN108733805B (en) File interaction method, system, computer equipment and storage medium
CN112799849A (en) Data processing method, device, equipment and storage medium
CN112988738A (en) Data slicing method and device for block chain
CN116743589B (en) Cloud host migration method and device and electronic equipment
CN113873052B (en) Domain name resolution method, device and equipment of Kubernetes cluster
CN113495982B (en) Transaction node management method and device, computer equipment and storage medium
CN116909816B (en) Database recovery method and device, storage medium and electronic equipment
CN110442447B (en) Message queue-based load balancing method and device and computer 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40084597

Country of ref document: HK