Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 illustrates anexemplary system architecture 100 to which embodiments of the information processing method of the present disclosure may be applied.
As shown in fig. 1, thesystem architecture 100 may includeterminal devices 1011, 1012, 1013, anetwork 102, and aserver 103.Network 102 is the medium used to provide communication links betweenterminal devices 1011, 1012, 1013 andserver 103.Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may interact with theserver 103 over thenetwork 102 using theterminal devices 1011, 1012, 1013 to send or receive messages or the like, e.g., theterminal devices 1011, 1012, 1013 may send user requests to theserver 103. Various communication client applications, such as shopping applications, payment applications, instant messaging software, etc., may be installed on theterminal devices 1011, 1012, 1013.
Theterminal devices 1011, 1012, 1013 may be hardware or software. When theterminal devices 1011, 1012, 1013 are hardware, they may be various electronic devices having a display screen and supporting information interaction, including but not limited to smart phones, tablet computers, laptop computers, and the like. When theterminal devices 1011, 1012, 1013 are software, they may be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
Theserver 103 may be a server that provides various services. For example, the server may be a server that processes the user request transmitted from theterminal equipment 1011, 1012, 1013 and transmits the obtained processing result to theterminal equipment 1011, 1012, 1013. Theserver 103 may first receive a user request; then, according to the logic execution code included in the user request, determining a target logic node from the candidate logic node set; then, determining input parameters needed by the target logic node from the related parameters; and finally, executing the target logic node to obtain a processing result.
Theserver 103 may be hardware or software. When theserver 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When theserver 103 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the information processing method provided by the embodiment of the present disclosure is generally executed by theserver 103, and the information processing apparatus is generally disposed in theserver 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, aflow 200 of one embodiment of an information processing method according to the present disclosure is shown. The information processing method comprises the following steps:
step 201, a user request is received.
In the present embodiment, an execution subject of the information processing method (e.g., a server shown in fig. 1) may receive a user request. The user request may include logic execution code and associated parameters. The above logic execution code may be used to indicate a logical node to be executed. The relevant parameters may be parameters required for executing the logical node, and generally depend on a specific application scenario. For example, if the selected logical node is used to verify whether the user is a real-name user, the related parameter may include a user identifier.
Step 202, determining a target logical node from the candidate logical node set according to the logic execution code.
In this embodiment, the execution subject may determine a logical node to be executed from the candidate logical node set according to the logical execution coding. A logical node generally refers to a node that checks one or more logics. A logical node may also be referred to as a logical unit.
As an example, the logical nodes in the candidate logical node set may be used to check the merchant state, may also be used to check the user state, and may also be used to check the merchant authority. The merchant status may include, but is not limited to, at least one of: an available state, an off state, and a frozen state. If the current order payment scene is the order payment scene, the executing body may verify the merchant state of the merchant indicated by the order by using the node for verifying the merchant state. The user status may include, but is not limited to, at least one of: an available state, a logged off state, and a suspended payment state. If the current situation is a presentation scene, the execution main body may check the user state of the user indicated by the order by using the node for checking the user state. The merchant authority generally refers to whether the merchant has authority for each payment scenario. If the current order payment scene is the order payment scene, the executing body can verify the merchant authority of the merchant indicated by the order by using the node for verifying the merchant authority. If the merchant does not have the receiving privileges, funds are not allowed to be transferred to the merchant's account.
Here, a logical node in the candidate logical node set may correspond to a code set, and for each logical node in the candidate logical node set, if the logic execution code exists in the code set corresponding to the logical node, the logical node may be determined as a target logical node.
And step 203, determining input parameters needed by the target logic node from the relevant parameters.
In this embodiment, the executing entity may determine the input parameters required by the target logical node from the relevant parameters in the user request. Here, the execution agent may store a correspondence relationship between the logical node and the input parameter of the logical node in advance, and the execution agent may determine the input parameter required by the target logical node from the relevant parameters by using the correspondence relationship.
And step 204, executing the target logic node to obtain a processing result.
In this embodiment, the execution subject may input the input parameter into the corresponding target logical node to obtain the processing result. As an example, if the target logical node is used to verify whether the user is a real-name user, the execution main body may determine the user identifier in the user request as an input parameter, and execute the logical node for verifying whether the user is a real-name user, thereby verifying whether the user is a real-name user.
Here, if the verification results are all verified, a processing result representing that the verification is successful may be generated. If at least one verification result is not passed by the characterization verification, a processing result of the characterization verification failure can be generated.
The method provided by the above embodiments of the present disclosure is performed by receiving a user request including a logical execution code and associated parameters; then, according to the logic execution codes, determining a target logic node from the candidate logic node set; then, determining input parameters needed by the target logic node from the related parameters; and finally, executing the target logic node to obtain a processing result. Through the method, the logic nodes can be combined and used according to different scenes, and compared with the method of adjusting the existing codes when the combination relation changes, the method can improve the development efficiency.
In some alternative implementations, the logical nodes in the candidate set of logical nodes may have priorities. The executing agent may execute the target logical node in the following manner to obtain a processing result: the execution main body may determine an execution order of the target logical node according to the priority of the target logical node, and specifically, may sequence the target logical node according to an order of priorities from high to low to obtain the execution order. And then, the target logic node can be executed according to the execution sequence to obtain a processing result.
In some optional implementations, the execution main body may send the processing result to a user terminal from which the user request originates. After receiving the processing result, the user terminal may perform a corresponding operation based on the processing result. Specifically, if the processing result represents that the verification is successful, the user terminal may present a page for representing that the verification is successful. For example, if the user performs an order payment operation, the user terminal may present a page for indicating that the order payment is successful. If the processing result represents that the verification fails, the user terminal may present a page for representing that the verification fails. For example, if the user performs an order payment operation, the user terminal may present a page for indicating that the order payment has failed.
In some alternative implementations, the logic units may be abstracted into one interface, and the concrete implementation of each logic unit is an implementation class of the interface. The logic nodes in the candidate logic node set may be configured to determine whether the logic execution code matches the logic node, or may execute the main logic of the logic node. Here, there is no limitation on the subject logic as long as there are input parameters and arithmetic logic.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the information processing method according to the present embodiment. In the application scenario of fig. 3, after receiving a request initiated by a user through a user terminal, a server may use an execution engine to traverse a logic unit implementation list (i.e., a candidate logic node set) according to a logic execution code included in the request, thereby obtaining a hit logic unit; thereafter, the execution engine may load and execute the hit logic unit, thereby generating a processing result; the processing result may then be returned to the user terminal.
With further reference to FIG. 4, aflow 400 of yet another embodiment of an information processing method is shown. Theflow 400 of the information processing method includes the following steps:
step 401, a user request is received.
In this embodiment, step 401 may be performed in a similar manner to step 201, and is not described herein again.
Step 402, for each logical node in the candidate logical node set, and the logical node code corresponding to the logical node and the logical execution code.
In this embodiment, for each logical node in the candidate logical node set, the execution body may perform bitwise and operation on the logical node code corresponding to the logical node and the logical execution code. The logical nodes in the candidate logical node set may correspond to a binary logical node code, and the logical execution code may be characterized as a binary code.
As an example, if the logical node code corresponding to the logical node a is: 00001000, the logic execution code is: 01101001, the execution entity can AND 00001000 and 01101001, the result is: 00001000.
in this embodiment, the execution body may determine whether the operation result is a target value, and the target value is usually a non-zero value, i.e., determine whether the operation result is non-zero. If the operation result is the target value, the execution body may executestep 403.
Instep 403, if the operation result is the target value, the logical node is determined as the target logical node.
In this embodiment, if the operation result is the target value, the execution subject may determine the logical node as the target logical node.
And step 404, determining input parameters needed by the target logic node from the relevant parameters.
Step 405, executing the target logical node to obtain a processing result.
In this embodiment, steps 404-405 may be performed in a similar manner as steps 203-204, and are not described herein again.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, theflow 400 of the information processing method in this embodiment embodies a step of performing bitwise and operation on the logical node code and the logical execution code corresponding to the logical node, and if the operation result is nonzero, determining the logical node as the target logical node. Therefore, the scheme described in this embodiment provides a selection method for selecting a target logical node, and the target logical node can be selected more accurately by the selection method.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an information processing apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 5, theinformation processing apparatus 500 of the present embodiment includes: a receivingunit 501, a first determiningunit 502, a second determiningunit 503 and an executingunit 504. The receivingunit 501 is configured to receive a user request, where the user request includes a logic execution code and related parameters; the first determiningunit 502 is configured to determine a target logical node from the candidate logical node set according to the logic execution coding; the second determiningunit 503 is configured to determine an input parameter required by the target logical node from the relevant parameters; theexecution unit 504 is configured to execute the target logical node to obtain a processing result.
In the present embodiment, specific processing of the receivingunit 501, the first determiningunit 502, the second determiningunit 503, and the executingunit 504 of theinformation processing apparatus 500 may refer to step 201,step 202,step 203, and step 204 in the corresponding embodiment of fig. 2.
In some optional implementations, the logical nodes in the candidate logical node set correspond to logical node codes, and the logical execution codes are characterized as binary; and the first determiningunit 502 may be further configured to determine the target logical node from the candidate logical node set by performing encoding according to the logic as follows: for each logical node in the candidate logical node set, the first determiningunit 502 may perform an and operation on the logical node code corresponding to the logical node and the logical execution code; if the operation result is the target value, the first determiningunit 502 may determine the logical node as the target logical node.
In some optional implementations, the logical nodes in the candidate logical node set have priorities; and the executingunit 504 may be further configured to execute the target logical node to obtain a processing result by: theexecution unit 504 may determine an execution order of the target logical node according to the priority of the target logical node, and execute the target logical node according to the execution order to obtain a processing result.
In some optional implementations, theinformation processing apparatus 500 may include: a sending unit (not shown in the figure). The sending unit may be configured to send the processing result to a user terminal from which the user request originates, so that the user terminal performs a corresponding operation based on the processing result.
In some alternative implementations, the logical nodes in the candidate logical node set may be used to determine whether the logical execution code matches the logical node and execute the logic of the logical node.
Referring now to FIG. 6, a schematic diagram of an electronic device (e.g., the server of FIG. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The electronic 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 disclosure.
As shown in fig. 6,electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of theelectronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via abus 604. An input/output (I/O) interface 605 is also connected tobus 604.
Generally, the following devices may be connected to the I/O interface 605:input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.;output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like;storage 608 including, for example, tape, hard disk, etc.; and acommunication device 609. The communication means 609 may allow theelectronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates anelectronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment 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 via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may 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 embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a user request, wherein the user request comprises a logic execution code and related parameters; determining a target logical node from the candidate logical node set according to the logic execution code; determining input parameters required by the target logic node from the related parameters; and executing the target logic node to obtain a processing result.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
According to one or more embodiments of the present disclosure, there is provided an information processing method including: receiving a user request, wherein the user request comprises a logic execution code and related parameters; determining a target logical node from the candidate logical node set according to the logic execution code; determining input parameters required by the target logic node from the related parameters; and executing the target logic node to obtain a processing result.
According to one or more embodiments of the present disclosure, a logical node in the candidate logical node set corresponds to a logical node code, and the logical execution code is characterized as binary; and determining a target logical node from the set of candidate logical nodes according to the logical execution code, including: for each logic node in the candidate logic node set, performing AND operation on the logic node code corresponding to the logic node and the logic execution code; and if the operation result is the target value, determining the logic node as the target logic node.
According to one or more embodiments of the present disclosure, logical nodes in a candidate set of logical nodes have priorities; and executing the target logic node to obtain a processing result, wherein the processing result comprises: and determining the execution sequence of the target logic node according to the priority of the target logic node, and executing the target logic node according to the execution sequence to obtain a processing result.
According to one or more embodiments of the present disclosure, after the target logical node is executed and a processing result is obtained, the method includes: and sending the processing result to the user terminal from which the user request comes, so that the user terminal executes corresponding operation based on the processing result.
According to one or more embodiments of the present disclosure, the logical nodes in the candidate logical node set are used to determine whether the logical execution code matches the logical node and execute the logic of the logical node.
According to one or more embodiments of the present disclosure, there is provided an information processing apparatus including: the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a user request, and the user request comprises logic execution codes and related parameters; a first determination unit configured to determine a target logical node from the candidate logical node set according to the logical execution coding; the second determining unit is used for determining input parameters required by the target logic node from the related parameters; and the execution unit is used for executing the target logic node to obtain a processing result.
According to one or more embodiments of the present disclosure, a logical node in the candidate logical node set corresponds to a logical node code, and the logical execution code is characterized as binary; and the first determination unit is further configured to determine the target logical node from the set of candidate logical nodes by performing encoding according to logic in such a manner that: for each logic node in the candidate logic node set, performing AND operation on the logic node code corresponding to the logic node and the logic execution code; and if the operation result is the target value, determining the logic node as the target logic node.
According to one or more embodiments of the present disclosure, logical nodes in a candidate set of logical nodes have priorities; and the execution unit is further used for executing the target logic node to obtain a processing result in the following way: and determining the execution sequence of the target logic node according to the priority of the target logic node, and executing the target logic node according to the execution sequence to obtain a processing result.
According to one or more embodiments of the present disclosure, the apparatus includes: and the sending unit is used for sending the processing result to the user terminal from which the user request comes, so that the user terminal executes corresponding operation based on the processing result.
According to one or more embodiments of the present disclosure, the logical nodes in the candidate logical node set are used to determine whether the logical execution code matches the logical node and execute the logic of the logical node.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, a first determining unit, a second determining unit, and an executing unit. Where the names of the units do not in some cases constitute a limitation of the units themselves, for example, a receiving unit may also be described as a "unit that receives a user request".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.