CN112764828B - Business logic management method and device, computer equipment and medium - Google Patents

Business logic management method and device, computer equipment and medium Download PDF

Info

Publication number
CN112764828B
CN112764828B CN202110014512.3A CN202110014512A CN112764828B CN 112764828 B CN112764828 B CN 112764828B CN 202110014512 A CN202110014512 A CN 202110014512A CN 112764828 B CN112764828 B CN 112764828B
Authority
CN
China
Prior art keywords
data
shared
chain
function
verified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110014512.3A
Other languages
Chinese (zh)
Other versions
CN112764828A (en
Inventor
王刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Baiping Technology Co ltd
Original Assignee
Chongqing Baiping Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Baiping Technology Co ltd filed Critical Chongqing Baiping Technology Co ltd
Priority to CN202110014512.3A priority Critical patent/CN112764828B/en
Publication of CN112764828A publication Critical patent/CN112764828A/en
Application granted granted Critical
Publication of CN112764828B publication Critical patent/CN112764828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44557Code layout in executable memory
    • G06F9/44563Sharing

Abstract

The disclosure provides a business logic management method and device, computer equipment and medium, and relates to the technical field of computers. The implementation scheme is as follows: in response to a first trigger condition being met, creating a context chain and a shared memory space associated with the context chain that is readable and writable, wherein the context chain includes one or more service nodes; and storing the shared data of the context chain into the shared storage space.

Description

Business logic management method and device, computer equipment and medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a business logic management method and apparatus, a computer device, a medium, and a program product.
Background
Business logic may be a representation of any portion of a business execution process. The specified services, such as path tracking for browsing pages, event forwarding, event response, etc., may be accomplished by executing a set of consecutive service logic. With the development of computer technology, the number of service logics required in a service is increasing, and the relationship between service logics is becoming complex.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The disclosure provides a business logic management method and device, computer equipment and medium.
According to an aspect of the present disclosure, there is provided a service logic management method, including: in response to a first trigger condition being met, creating a context chain and a shared memory space associated with the context chain that is readable and writable, wherein the context chain includes one or more service nodes; and storing the shared data of the context chain into the shared storage space.
According to another aspect of the present disclosure, there is provided a service logic management apparatus, including: a first creating unit configured to create a context chain and a readable and writable shared memory space associated with the context chain in response to a first trigger condition being met, wherein the context chain comprises one or more service nodes; and the first writing unit is configured to store the shared data of the context chain to the shared storage space.
According to another aspect of the present disclosure, there is provided a computer apparatus comprising: a memory, a processor and a computer program stored on the memory, wherein the processor is configured to execute the computer program to implement the steps of the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the above-described method.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
According to one or more embodiments of the present disclosure, in the execution process of service logic, data in a context chain can be effectively managed through a shared storage space, so that the execution efficiency of service logic is improved, and storage resources are saved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, in accordance with an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a business logic management method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a business logic management method of path tracking of a browsed page according to an exemplary embodiment of the present disclosure;
FIG. 4 is a block diagram illustrating a business logic management apparatus according to an exemplary embodiment of the present disclosure;
fig. 5 is a block diagram illustrating an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
In the field of computer technology, a service often requires the invocation of multiple service logics to complete. For example, to handle event forwarding traffic, user authentication traffic logic, send object selection traffic logic, send traffic logic, etc. may need to be invoked in sequence. Wherein each invoked service logic may correspond to a service node in the context chain.
In the related art, data related to each business logic is stored in a node storage space corresponding to the business logic. In the process of sequentially executing a plurality of business logics, when the latter business logic needs to call the data related to the former business logic, the node storage space corresponding to the former business logic needs to be accessed to acquire the required data. With the development of computer technology, the number of service logics required in a service is increasing, and the relationship between service logics is becoming complex. In the process of executing a service logic, the data related to the previous service logic is often required to be called, and thus, multiple accesses to multiple different node storage spaces are required to obtain the required data, which results in reduced execution efficiency of the service logic.
Based on the above, the present disclosure provides a method for managing service logic, by creating a readable and writable shared storage space associated with a context chain, and performing unified management on shared information of each service node in the context chain, thereby, in the execution process of service logic, required shared data can be obtained by accessing the shared storage space, so that the execution efficiency of service logic is improved, and storage resources are saved.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented, in accordance with an embodiment of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable execution of business logic management methods.
In some embodiments, server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that are executable by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and/or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be appreciated that a variety of different system configurations are possible, which may differ from system 100. Accordingly, FIG. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may use client devices 101, 102, 103, 104, 105, and/or 106 to effect triggering of the relevant conditions. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that the present disclosure may support any number of client devices.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and the like. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, apple iOS, UNIX-like operating systems, linux, or Linux-like operating systems (e.g., google Chrome OS); or include various mobile operating systems such as Microsoft Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablet computers, personal Digital Assistants (PDAs), and the like. Wearable devices may include head mounted displays and other devices. The gaming system may include various handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a number of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. For example only, the one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture that involves virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices of the server). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. Server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
In some implementations, the server 120 may be a server of a distributed system or a server that incorporates a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual private server (VPS, virtual Private Server) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of databases 130 may be used to store information such as audio files and video files. The data store 130 may reside in a variety of locations. For example, the data store used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The data store 130 may be of different types. In some embodiments, the data store used by server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve the databases and data from the databases in response to the commands.
In some embodiments, one or more of databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key value stores, object stores, or conventional stores supported by the file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
Fig. 2 is a flowchart illustrating a service logic management method according to an exemplary embodiment of the present disclosure, as shown in fig. 2, the method may include: step S201, in response to the first trigger condition being met, a context chain and a readable and writable shared storage space associated with the context chain are created, wherein the context chain comprises one or more service nodes; step S202, storing the shared data of the context chain into the shared storage space. Therefore, in the execution process of the business logic, the shared data in the context chain can be centrally managed through the shared storage space, the execution efficiency of the business logic is improved, and the storage resources are saved.
For step S201, according to some embodiments, the first trigger condition may include an active service request of the user at the terminal, e.g., creating a context chain of the event forwarding service in response to an event forwarding request initiated by the user at the terminal.
According to other embodiments, the first trigger condition may also be a regular business operation of the user under a preset trigger rule, for example, a preset trigger rule based on a path tracking business of the browsing page may be created when the user opens a specific application program.
According to some embodiments, based on the first trigger condition, the created context chain may include one service node or multiple service nodes, which is not limited herein.
According to some embodiments, each service node in the context chain may read the required data from the shared memory space, or may write the processing result to be shared into the shared memory space.
According to some embodiments, the shared data in the shared memory space may include a data identifier, which may be a service node identifier, so that reading or writing of data corresponding to the relevant service node from the shared memory space may be facilitated; the data identification may also be an identification of an attribute of the data, whereby reading or writing of data having the attribute from the shared memory space may be facilitated.
According to some embodiments, the shared data may include attribute data of the context chain. Because the attribute data of the context chain is related to each service node in the context chain, the attribute data of the context chain is stored in the shared storage space as shared data, so that the service node can conveniently inquire and read the attribute data of the context chain, and the processing efficiency of service logic is improved. Meanwhile, the attribute data of the context chains are uniformly stored in the shared storage space, so that the attribute data of the same context chains are prevented from being repeatedly stored in a plurality of node storage spaces, and storage resources are saved.
According to some embodiments, the shared data may also include user data.
According to some embodiments, the attribute data may include a length of the context chain. Therefore, the verification can be conveniently carried out when each service node is generated, and the length of the context chain is effectively controlled.
In one embodiment, the data identification corresponding to the length of the context chain in the shared memory space may be an identification of the "length" attribute. When any service node in the context chain needs to read the length of the context chain stored in the shared memory space, the value of the length of the context chain can be read by the identifier of the "length" attribute.
In one embodiment, when a new service node is added to the context chain, the length of the context chain may be obtained by accessing the shared memory space. If the service node does not exceed the length limit of the context chain, processing corresponding service logic; if the service node exceeds the length limit of the context chain, the service node is deleted.
According to some embodiments, creating the context chain may further comprise: in response to the second trigger condition being met, a new service node is added in the context chain. The business logic management method may further include: in response to determining that the new service node has relevant functional attributes, a functional chain corresponding to the functional attributes is created based on preset rules, and the functional chain can read required shared data from the shared storage space. Thus, a corresponding functional chain can be generated based on the functional attributes of the service node to achieve a corresponding operation.
According to some embodiments, the second trigger condition may be an initialization of a new service logic in a service, whereby a new service node corresponding to the new service logic may be added in the context chain.
It can be appreciated that the service node may have a related functional attribute, based on which a functional chain corresponding to the functional attribute may be created based on a preset rule; the service node may not have associated functional attributes and thus no functional chain is created.
According to some embodiments, a functional chain may include one or more sequentially executing functional elements. Wherein each function is capable of performing an independent functional task.
According to some embodiments, the same function can be multiplexed in a plurality of different function chains, thereby effectively reducing the coding amount of the function chains.
According to some embodiments, the preset rule may be a preset function chain function, which may specify the functions that are included in the function chain and the execution order of the functions that are included.
According to some embodiments, the function chain function may be stored in the terminal device. An application in the terminal device can quickly call the function chain function.
According to some embodiments, the function chain functions may be stored in a server. The terminal device is able to invoke the function chain function stored in the server through a communication connection with the server.
According to some embodiments, the function chain functions may be updated based on need.
According to some embodiments, the functional chain and the context chain execute asynchronously, without interfering with each other.
It will be appreciated that the functional chain may access the shared memory space through the corresponding service node, or may not access the shared memory space through the service node, which is not limited herein.
According to some embodiments, the function chain may include a plurality of functions, the plurality of functions may include at least one function to be verified, and the service logic management method may further include: for each function to be verified in at least one function to be verified, in response to determining that the verification result of the output data of the function to be verified is failed, the function to be verified does not transmit the output data to the next function adjacent to the function to be verified. Therefore, the function chain can be terminated in time under the condition that the verification is not passed, and the error data is prevented from being continuously transmitted in the function chain.
According to some embodiments, the business logic management method may further include: and in response to determining that the verification result of the output data of the functional piece to be verified is passing, the functional piece to be verified transmits the output data to the next functional piece adjacent to the functional piece to be verified. Therefore, the validity of the data transmitted in the function chain can be ensured through checking the output data of the function piece to be checked.
For example, for a service node corresponding to a sending service logic in the event forwarding service, a functional element to be verified for verifying a forwarding object may be included in a related functional chain. When the forwarding object is not in the friend list of the user, the verification result of the output data of the function piece to be verified is that the output data does not pass, the function chain is terminated, and the function piece to be verified does not transmit the output data to the next function piece; when the forwarding object is in the friend list of the user, the function chain can continue to execute, and the function to be checked transmits output data to the next function.
After step S201 is completed, a context chain and a readable and writable shared memory space associated with the context chain are created, step S202 may be further performed to store the shared data of the context chain in the shared memory space.
According to some embodiments, the data stored in the shared memory space may be in a first preset data format, and storing the shared data of the context chain into the shared memory space may include: encoding the shared data into a first preset data format; and writing the shared data encoded into the first preset data format into the shared storage space. Therefore, the shared storage space can store the shared data with various different data formats in a unified data format, and is convenient for managing the shared data.
According to some embodiments, the first preset data format may be a binary data format.
It will be appreciated that the first preset data format may be set to other data formats as needed, which is not limited herein.
According to some embodiments, the business logic management method may further include: receiving a read request aiming at the shared storage space, wherein the read request comprises a second preset data format and a preset data identifier; acquiring data corresponding to the preset data identifier from a shared storage space; and decoding the data corresponding to the preset data identifier into a second preset data format. Therefore, the shared data in the shared storage space can be read and processed by business logic based on other data formats, and the application of the context chain across the data formats and across the development platform is realized.
According to some embodiments, the second preset data format may be a different data format than the first preset data format.
According to some embodiments, the preset data identifier may be a service node identifier, so that data corresponding to the relevant service node may be read from the shared storage space; the preset data identification may also be an identification of a data attribute, whereby data having that attribute may be read from the shared memory space.
According to some embodiments, the business logic management method may further include: for each service node of the one or more service nodes, creating a readable and writable node storage space associated with the service node; and storing the node data of the service node into a node storage space. Therefore, the data unique to the service node can be stored in the node storage space, so that the service logic corresponding to the service node can write or read the data unique to the service node conveniently.
According to some embodiments, at least one node storage associated with at least one service node is deleted in response to deleting at least one service node of the one or more service nodes. Thus, the memory space occupied by the memory space of at least one node associated with at least one service node can be released in time when the at least one service node of one or more service nodes is deleted.
According to some embodiments, in case all service nodes in the context chain are deleted, the shared memory space associated with the context chain may be deleted.
According to some embodiments, the first trigger condition may include application initialization, and storing the shared data of the context chain to the shared memory space may include: and storing the page tracking result of the application program into the shared storage space. Thus, when a path tracking service of browsing pages is performed, the recorded page path tracking information can be stored through the shared memory space associated with the context chain.
According to some embodiments, as shown in FIG. 3, path tracking of a viewed page may be achieved by:
in response to the user initializing the application program at the terminal, a context chain for path tracking of the browsed page and a readable and writable shared storage space associated with the context chain may be created as described in step S201, where the context chain includes a service node corresponding to the user browsed first page (i.e. service logic), and data in the shared storage space may be stored in a binary data format;
in response to a user jumping from a first page to a second page, adding a new service node corresponding to the jump to the second page (i.e., service logic) in the context chain;
In response to the service node having the functional attribute of the path information record, invoking a function chain function for the path information record to create a function chain, for example, the function chain may sequentially include an activity start function, a log record function, and a page tracking function, wherein the functions performed by the page tracking function may include recording a previous service node, an already recorded browsing page path, a current service node, and a currently recorded browsing page path, and the page tracking function may also record other more detailed information including a user browsing duration, a browsing number of times, and the like;
specifically, the function chain may send a read request to the shared storage space to obtain shared data such as a last service node stored in the shared storage space, a browsing page path already recorded, and the like;
decoding shared data in binary data formats such as a last service node stored in the shared storage space, a recorded browsing page path and the like into a data format required by a functional chain by using a decoder connected with the shared storage space, and transmitting the decoded shared data to the functional chain;
the function chain records a last service node (e.g., QViewController), an already recorded browsing page path (e.g., aviewcontroller→kv iewcontroller→qviewcontroller), and further records current service node information (e.g., WViewController), and a currently recorded browsing page path (e.g., aviewcontroller→kviewcontroller→qviewcontroller→wviewcontroller) according to shared data acquired from the shared memory space;
The function chain may send the recorded data to the shared storage space as shared data, for example, as described in step S202, the shared data may be encoded into a binary data format by using an encoder connected to the shared storage space and then stored in the shared storage space, where the shared data may be continuously read by a function chain created by a subsequent service node, or may be read by service logic other than the function chain.
When the user continues to execute page skip in the application program, adding a corresponding new service node in the context chain correspondingly, and calling a corresponding function chain function to create a function chain in response to the function attribute of the newly added service node;
the shared data of the context chain is stored in the shared memory space until the path tracking service of the browsing page is finished.
It will be appreciated that the path tracking of the browsed page is only an exemplary embodiment of the present disclosure, and the service logic management method disclosed in the present disclosure may also be used in various services including event forwarding, event response, and the like, which is not limited herein.
According to another aspect of the present disclosure, as shown in fig. 4, there is also provided a service logic management apparatus 400, the apparatus 400 may include a first creating unit 401 configured to create a context chain and a readable and writable shared storage space associated with the context chain in response to a first trigger condition being satisfied, wherein the context chain includes one or more service nodes; the first writing unit 402 is configured to store the shared data of the context chain to the shared memory space.
According to some embodiments, the shared data includes attribute data of the context chain.
According to some embodiments, the attribute data comprises a length of a context chain.
According to some embodiments, the data stored in the shared memory space is in a first predetermined data format, and the first writing unit includes: an encoding unit configured to encode the shared data into the first preset data format; and the writing subunit is configured to write the shared data encoded into the first preset data format into the shared storage space.
According to some embodiments, the apparatus further comprises: a receiving unit configured to receive a read request for the shared storage space, where the read request includes a second preset data format and a preset data identifier; an obtaining unit, configured to obtain data corresponding to the preset data identifier from the shared storage space; and the decoding unit is configured to decode the data corresponding to the preset data identifier into the second preset data format.
According to some embodiments, the first creation unit further comprises: an adding unit configured to add a new service node in the context chain in response to a second trigger condition being met; the apparatus further comprises: and a second creation unit configured to create, based on a preset rule, a function chain corresponding to the function attribute capable of reading the required shared data from the shared storage space, in response to determining that the new service node has the relevant function attribute.
According to some embodiments, wherein the function chain comprises a plurality of functions including at least one function to be verified, the apparatus further comprises: and the transmission unit is configured to respond to the determination that the verification result of the output data of the functional piece to be verified is not passed for each functional piece to be verified in the at least one functional piece to be verified, and the functional piece to be verified does not transmit the output data to the next functional piece adjacent to the functional piece to be verified.
According to some embodiments, the transmission unit is further configured to transmit the output data to a next function adjacent to the function to be verified, in response to determining that the verification result of the output data to the function to be verified is pass.
According to some embodiments, the apparatus further comprises: a third creating unit configured to create, for each of the one or more service nodes, a readable and writable node storage space associated with the service node; and the second writing unit is configured to store the node data of the service node into the node storage space.
According to some embodiments, the apparatus further comprises: and a deletion unit configured to delete at least one node storage space associated with at least one of the one or more service nodes in response to deleting the at least one service node.
According to some embodiments, the first trigger condition includes application initialization, and the first writing unit is further configured to store a page tracking result for the application to the shared memory space.
According to another aspect of the present disclosure, there is also provided a computer apparatus including: a memory, a processor and a computer program stored on the memory, wherein the processor is configured to execute the computer program to implement the steps of the above method.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the above method.
According to another aspect of the present disclosure, there is also provided a computer program product comprising a computer program, wherein the computer program when executed by a processor realizes the steps of the above method.
Referring to fig. 5, a block diagram of an electronic device 500 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 includes a computing unit 501 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Various components in the device 500 are connected to the I/O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the device 500, the input unit 506 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote control. The output unit 507 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 508 may include, but is not limited to, magnetic disks, optical disks. The communication unit 509 allows the device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, 1302.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the business logic management method. For example, in some embodiments, the business logic management method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the business logic management method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the business logic management method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
While embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the methods, systems, and apparatus described above are merely illustrative embodiments or examples and that the scope of the present disclosure is not limited by these embodiments or examples. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the disclosure.

Claims (22)

1. A business logic management method, comprising:
in response to a first trigger condition being met, creating a context chain and a shared memory space associated with the context chain that is readable and writable, wherein the context chain includes one or more service nodes;
storing the shared data of the context chain to the shared storage space;
receiving a read request aiming at the shared storage space, wherein the read request comprises a second preset data format and a preset data identifier;
acquiring data corresponding to the preset data identifier from the shared storage space;
And decoding the data corresponding to the preset data identifier into the second preset data format.
2. The method of claim 1, wherein the shared data comprises attribute data of the context chain.
3. The method of claim 2, wherein the attribute data comprises a length of a context chain.
4. The method of any one of claim 1 to 3, wherein the data stored in the shared memory space is in a first predetermined data format,
the storing the shared data of the context chain into the shared memory space includes:
encoding the shared data into the first preset data format;
and writing the shared data encoded into the first preset data format into the shared storage space.
5. The method of claim 1, wherein creating a context chain further comprises:
in response to a second trigger condition being met, adding a new service node in the context chain;
the method further comprises the steps of:
in response to determining that the new service node has relevant functional attributes, a functional chain corresponding to the functional attributes is created based on preset rules, and the functional chain can read required shared data from the shared storage space.
6. The method of claim 5, wherein the function chain comprises a plurality of functions including at least one function to be verified, the method further comprising:
and for each function to be verified in the at least one function to be verified, responding to the fact that the verification result of the output data of the function to be verified is not passed, and not transmitting the output data to the next function adjacent to the function to be verified by the function to be verified.
7. The method of claim 6, the method further comprising:
and in response to determining that the verification result of the output data of the functional piece to be verified is passing, the functional piece to be verified transmits the output data to the next functional piece adjacent to the functional piece to be verified.
8. The method of claim 1, the method further comprising:
for each service node of the one or more service nodes, creating a readable and writable node storage space associated with the service node;
and storing the node data of the service node into the node storage space.
9. The method of claim 8, the method further comprising:
in response to deleting at least one of the one or more service nodes, deleting at least one node storage associated with the at least one service node.
10. The method of claim 1, wherein the first trigger condition comprises an application initialization,
the storing the shared data of the context chain into the shared memory space includes:
and storing the page tracking result of the application program into the shared storage space.
11. A business logic management apparatus comprising:
a first creating unit configured to create a context chain and a readable and writable shared memory space associated with the context chain in response to a first trigger condition being met, wherein the context chain comprises one or more service nodes;
a first writing unit configured to store shared data of the context chain to the shared storage space;
a receiving unit configured to receive a read request for the shared storage space, where the read request includes a second preset data format and a preset data identifier;
an obtaining unit, configured to obtain data corresponding to the preset data identifier from the shared storage space;
and the decoding unit is configured to decode the data corresponding to the preset data identifier into the second preset data format.
12. The apparatus of claim 11, wherein the shared data comprises attribute data of the context chain.
13. The apparatus of claim 12, wherein the attribute data comprises a length of a context chain.
14. The apparatus of any one of claim 11 to 13, wherein the data stored in the shared memory space is in a first predetermined data format,
the first writing unit includes:
an encoding unit configured to encode the shared data into the first preset data format;
and the writing subunit is configured to write the shared data encoded into the first preset data format into the shared storage space.
15. The apparatus of claim 11, wherein the first creation unit further comprises:
an adding unit configured to add a new service node in the context chain in response to a second trigger condition being met;
the apparatus further comprises:
and a second creation unit configured to create, based on a preset rule, a function chain corresponding to the function attribute capable of reading the required shared data from the shared storage space, in response to determining that the new service node has the relevant function attribute.
16. The apparatus of claim 15, wherein the function chain comprises a plurality of functions including at least one function to be verified, the apparatus further comprising:
and the transmission unit is configured to respond to the determination that the verification result of the output data of the functional piece to be verified is not passed for each functional piece to be verified in the at least one functional piece to be verified, and the functional piece to be verified does not transmit the output data to the next functional piece adjacent to the functional piece to be verified.
17. The apparatus of claim 16, wherein the transmitting unit is further configured to transmit the output data to a next function adjacent to the function to be verified, in response to determining that the verification result of the output data of the function to be verified is pass.
18. The apparatus of claim 11, the apparatus further comprising:
a third creating unit configured to create, for each of the one or more service nodes, a readable and writable node storage space associated with the service node;
and the second writing unit is configured to store the node data of the service node into the node storage space.
19. The apparatus of claim 18, the apparatus further comprising:
and a deletion unit configured to delete at least one node storage space associated with at least one of the one or more service nodes in response to deleting the at least one service node.
20. The apparatus of claim 11, wherein the first trigger condition comprises an application initialization,
the first writing unit is further configured to store a page tracking result for the application program to the shared memory space.
21. A computer device, comprising:
a memory, a processor and a computer program stored on the memory,
wherein the processor is configured to execute the computer program to implement the steps of the method of any one of claims 1-10.
22. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the method of any of claims 1-10.
CN202110014512.3A 2021-01-06 2021-01-06 Business logic management method and device, computer equipment and medium Active CN112764828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110014512.3A CN112764828B (en) 2021-01-06 2021-01-06 Business logic management method and device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110014512.3A CN112764828B (en) 2021-01-06 2021-01-06 Business logic management method and device, computer equipment and medium

Publications (2)

Publication Number Publication Date
CN112764828A CN112764828A (en) 2021-05-07
CN112764828B true CN112764828B (en) 2023-05-16

Family

ID=75701577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110014512.3A Active CN112764828B (en) 2021-01-06 2021-01-06 Business logic management method and device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN112764828B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972200A (en) * 2005-02-21 2007-05-30 索尼计算机娱乐公司 Network system, and constitutive component therefor, and visualization method for network
CN107158705A (en) * 2017-05-18 2017-09-15 腾讯科技(深圳)有限公司 The update method and device of service
CN107426803A (en) * 2015-12-01 2017-12-01 联发科技股份有限公司 The method and mobile device of bypass data
CN109101812A (en) * 2018-08-28 2018-12-28 北京神州绿盟信息安全科技股份有限公司 A kind of parameter verification method, apparatus, computing device and storage medium
CN110445765A (en) * 2019-07-12 2019-11-12 平安普惠企业管理有限公司 Data sharing method, terminal device and medium based on block chain
CN110442340A (en) * 2019-07-04 2019-11-12 重庆金融资产交易所有限责任公司 List generation method, device and computer equipment based on data processing
CN111158591A (en) * 2019-12-20 2020-05-15 苏州浪潮智能科技有限公司 Method, equipment and medium for adapting storage system to streaming media service
CN111651121A (en) * 2020-04-29 2020-09-11 中国平安财产保险股份有限公司 Data logic calculation method and device, electronic equipment and storage medium
CN111708837A (en) * 2020-06-04 2020-09-25 湖南天河国云科技有限公司 Multi-ore-machine parallel ore digging method and equipment based on block chain shared storage technology
CN111880921A (en) * 2020-07-31 2020-11-03 平安国际智慧城市科技股份有限公司 Job processing method and device based on rule engine and computer equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ATE542353T1 (en) * 2005-02-21 2012-02-15 Sony Computer Entertainment Inc METHOD AND SYSTEM FOR MANAGING CONTEXT IN A COMPUTER NETWORK
US9671970B2 (en) * 2015-10-27 2017-06-06 International Business Machines Corporation Sharing an accelerator context across multiple processes

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972200A (en) * 2005-02-21 2007-05-30 索尼计算机娱乐公司 Network system, and constitutive component therefor, and visualization method for network
CN107426803A (en) * 2015-12-01 2017-12-01 联发科技股份有限公司 The method and mobile device of bypass data
CN107158705A (en) * 2017-05-18 2017-09-15 腾讯科技(深圳)有限公司 The update method and device of service
CN109101812A (en) * 2018-08-28 2018-12-28 北京神州绿盟信息安全科技股份有限公司 A kind of parameter verification method, apparatus, computing device and storage medium
CN110442340A (en) * 2019-07-04 2019-11-12 重庆金融资产交易所有限责任公司 List generation method, device and computer equipment based on data processing
CN110445765A (en) * 2019-07-12 2019-11-12 平安普惠企业管理有限公司 Data sharing method, terminal device and medium based on block chain
CN111158591A (en) * 2019-12-20 2020-05-15 苏州浪潮智能科技有限公司 Method, equipment and medium for adapting storage system to streaming media service
CN111651121A (en) * 2020-04-29 2020-09-11 中国平安财产保险股份有限公司 Data logic calculation method and device, electronic equipment and storage medium
CN111708837A (en) * 2020-06-04 2020-09-25 湖南天河国云科技有限公司 Multi-ore-machine parallel ore digging method and equipment based on block chain shared storage technology
CN111880921A (en) * 2020-07-31 2020-11-03 平安国际智慧城市科技股份有限公司 Job processing method and device based on rule engine and computer equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Context:业务流程共享变量";郭强;《goframe.org/plugins/servlet/mobile?contentId=3672552&utm_source=wechat_session&utm_medium=social&utm_oi=640535696775974912#content/view/3672552》;20210105;第1-5页 *
"以上下文(context)的形式创建一个共享数据的容器";Artech;《www.cnblogs.com/artech/archive/2013/04/14/execution-context.html》;20130414;第1-4页 *
"多分区环境下多核操作系统结构研究";刘鸽 等;《信息安全与技术》;20160110;第7卷(第1期);第43-45页 *

Also Published As

Publication number Publication date
CN112764828A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN113411645B (en) Information recommendation method and device, electronic equipment and medium
JP2022159405A (en) Method and device for appending data, electronic device, storage medium, and computer program
CN113986788A (en) Data processing method and device, chip, electronic device and medium
CN112882734A (en) Upgrading method and device, computer equipment and medium
CN116306396A (en) Chip verification method and device, equipment and medium
CN114035829A (en) Page component updating method and device, electronic equipment and storage medium
CN112732312A (en) Method and device for updating application program, electronic equipment and medium
CN112948018A (en) Dynamic library loading method, device, equipment and medium for small program
CN112764828B (en) Business logic management method and device, computer equipment and medium
CN114510308B (en) Method, device, equipment and medium for storing application page by mobile terminal
CN113839944B (en) Method, device, electronic equipment and medium for coping with network attack
CN107168648B (en) File storage method and device and terminal
CN113641929B (en) Page rendering method, device, electronic equipment and computer readable storage medium
CN114040381A (en) Encryption method, decryption method, device and electronic equipment
CN113126928A (en) File moving method and device, electronic equipment and medium
CN113012258A (en) Method and device for generating multi-segment line graph, electronic equipment and readable medium
CN114398653B (en) Data processing method, device, electronic equipment and medium
CN115098165B (en) Data processing method, device, chip, equipment and medium
CN116016373A (en) Method, device, equipment and medium for sending data processing request
CN113010383B (en) Error log filtering method, device, electronic equipment and readable medium
CN113961189A (en) Webpage editing method and device
CN116700791A (en) Method, apparatus, device and medium for caching instructions
CN115796254A (en) Data processing method, device, chip, equipment and medium
CN112947846A (en) Batch processing task execution method and device of object storage system and electronic equipment
CN115879415A (en) Serialization and deserialization method and device, electronic equipment and storage medium

Legal Events

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