CN112764828A - 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
CN112764828A
CN112764828A CN202110014512.3A CN202110014512A CN112764828A CN 112764828 A CN112764828 A CN 112764828A CN 202110014512 A CN202110014512 A CN 202110014512A CN 112764828 A CN112764828 A CN 112764828A
Authority
CN
China
Prior art keywords
data
function
shared
storage space
chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110014512.3A
Other languages
Chinese (zh)
Other versions
CN112764828B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a business logic management method and device, computer equipment and a 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 read-write shared memory space associated with the context chain, wherein the context chain comprises one or more service nodes; storing the shared data of the context chain to 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 technologies, and in particular, to a method and an apparatus for business logic management, a computer device, a medium, and a program product.
Background
The business logic may be a representation of any portion of a business execution process. The designated services, such as path tracking, event forwarding, event response to browsed pages, etc., may be accomplished by executing a set of coherent service logic. With the development of computer technology, the number of service logics required in a service is increasing, and the relationship between the service logics is becoming more and more 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, unless otherwise indicated, the problems mentioned in this section should not be considered as having been acknowledged in any prior art.
Disclosure of Invention
The disclosure provides a business logic management method and device, computer equipment and a medium.
According to an aspect of the present disclosure, there is provided a business logic management method, including: in response to a first trigger condition being met, creating a context chain and a read-write shared memory space associated with the context chain, wherein the context chain comprises one or more service nodes; and storing the shared data of the context chain to a shared storage space.
According to another aspect of the present disclosure, there is provided a business logic management apparatus, including: a first creating unit 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 met, wherein the context chain includes one or more service nodes; 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 device 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, a non-transitory computer readable storage medium is provided, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described above.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program realizes the steps of the above-described method when executed by a processor.
According to one or more embodiments of the disclosure, in the execution process of the business logic, data in the context chain can be effectively managed through the shared storage space, so that the execution efficiency of the business logic is improved, and the storage resources are saved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers 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, according to 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 flowchart illustrating a business logic management method for path tracking of a browsing 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 with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope 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, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, the timing relationship, or the importance relationship of the elements, and such terms are used only 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, based on the context, they may also refer to different instances.
The terminology used in the description of the various described 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, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass 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 services, it may be necessary to invoke user authentication service logic, sending object selection service logic, sending service logic, and so on 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 service logic is stored in a node storage space corresponding to the service logic. In the process of sequentially executing a plurality of business logics, when a subsequent business logic needs to call data related to a previous business logic, a node storage space corresponding to the previous 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 the service logics is becoming more and more complex. During the execution of one service logic, data related to a plurality of previous service logics are often required to be called, which requires multiple accesses to storage spaces of a plurality of different nodes to obtain required data, resulting in reduced execution efficiency of the service logic.
Based on this, the present disclosure provides a method for managing service logic, which performs unified management on shared information of each service node in a context chain by creating a readable and writable shared storage space associated with the context chain, so that in the execution process of the service logic, required shared data can be obtained by accessing the shared storage space, thereby improving the execution efficiency of the service logic and saving storage resources.
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 embodiments 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 the business logic management methods to be performed.
In some embodiments, the server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In certain 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, which may be executed by one or more processors. A user operating a client device 101, 102, 103, 104, 105, and/or 106 may, in turn, utilize one or more client applications to interact with the server 120 to take advantage of the services provided by these components. It should be understood 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 any number of client devices may be supported by the present disclosure.
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 so forth. 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, tablets, Personal Digital Assistants (PDAs), and the like. Wearable devices may include head mounted displays and other devices. The gaming system may include a variety of 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 variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. By way of example only, 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 involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the 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. The 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, and the like.
In some implementations, the server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the 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 embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) 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 the databases 130 may be used to store information such as audio files and video files. The data store 130 may reside in various 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 certain embodiments, the data store used by the server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to the command.
In some embodiments, one or more of the 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 regular stores supported by a 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 business logic management method according to an exemplary embodiment of the present disclosure, which may include, as shown in fig. 2: step S201, responding to the first trigger condition being met, creating a context chain and a read-write shared storage space associated with the context chain, wherein the context chain comprises one or more service nodes; step S202, storing the shared data of the context chain to a shared storage space. Therefore, in the execution process of the business logic, the shared data in the context chain can be managed in a centralized manner through the shared storage space, the execution efficiency of the business logic is improved, and the storage resources are saved.
With respect to step S201, according to some embodiments, the first trigger condition may include an active service request of the user at the terminal, for example, a context chain of an event forwarding service is created in response to an event forwarding request initiated at the terminal by the user.
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 of a path tracking business based on a browsing page may create a context chain of the path tracking business of the browsing page when the user opens a specific application.
According to some embodiments, the created context chain may include one service node or may include a plurality of service nodes based on the first trigger condition, which is not limited herein.
According to some embodiments, each service node in the context chain can read the required data from the shared memory space, and can also write the processing result required to be shared into the shared memory space.
According to some embodiments, the shared data in the shared storage 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 storage space may be facilitated; the data identification may also be an identification regarding 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 a 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 nodes 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 chain is uniformly stored in the shared storage space, so that the repeated storage of the attribute data of the same context chain in a plurality of node storage spaces is avoided, and the 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 check can be conveniently carried out when each service node is generated, and the length of the context chain can be 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 regarding a "length" attribute. When any service node in the context chain needs to read the length of the context chain stored in the shared storage space, the value of the length of the context chain can be read through 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 can 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 service logic management method may further include: and in response to determining that the new service node has the relevant function attribute, creating a function chain corresponding to the function attribute based on a preset rule, wherein the function chain can read required shared data from the shared storage space. Therefore, a corresponding function chain can be generated based on the function attribute of the service node to realize 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 understood that the service node may have a related function attribute, and based on the function attribute, a function chain corresponding to the function attribute may be created based on a preset rule; the service node may not have an associated functional attribute and thus no functional chain is created.
According to some embodiments, a function chain may include one or more functions that are executed in sequence. 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 code amount of the function chains.
According to some embodiments, the preset rule may be a preset function chain function, and the function chain function may specify the functions included in the function chain and the execution sequence of the functions included in the function chain.
According to some embodiments, the function chain functions may be stored in the terminal device. An application in the terminal device can quickly call a function chain function.
According to some embodiments, the function chain functions may be stored in a server. The terminal device can call the function chain function stored in the server through the communication connection with the server.
According to some embodiments, the function chain functions may be updated on an as needed basis.
According to some embodiments, the functional chain executes asynchronously and without interfering with the context chain.
It can be understood that the function 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 checked, and the business logic management method may further include: for each to-be-verified functional part in at least one to-be-verified functional part, in response to determining that the verification result of the output data of the to-be-verified functional part does not pass, the to-be-verified functional part does not transmit the output data to a next functional part adjacent to the to-be-verified functional part. Therefore, the functional chain can be terminated in time under the condition that the check fails, and the error data can be prevented from being continuously transmitted in the functional 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 part to be verified is passed, the functional part to be verified transmits the output data to the next functional part adjacent to the functional part to be verified. Therefore, the validity of the data transmitted in the function chain can be ensured through the verification of the output data of the function piece to be verified.
For example, for a service node corresponding to a sending service logic in an event forwarding service, a function chain related to the service node may include a function to be checked for checking a forwarding object. When the forwarding object is not in the friend list of the user, the verification result of the output data of the functional part to be verified is failed, the functional chain is terminated, and the functional part to be verified does not transmit the output data to the next functional part; when the forwarding object is in the user's buddy list, the function chain may continue to execute, and the function to be verified transmits the output data to the next function.
After the context chain and the readable and writable shared memory space associated with the context chain are created in step S201, step S202 may be further executed to store the shared data of the context chain into 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 to the shared memory space may include: encoding the shared data into a first preset data format; and writing the shared data coded into the first preset data format into the shared storage space. Therefore, the shared storage space can store the shared data in various different data formats in a uniform data format, and the management of the shared data is facilitated.
According to some embodiments, the first preset data format may be a binary data format.
It is to be understood that the first predetermined data format may be set to other data formats as needed, and 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 identification from a shared storage space; and decoding the data corresponding to the preset data identification 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 application of a context chain across data formats and a across development platform is realized.
According to some embodiments, the second preset data format may be another data format different from the first preset data format.
According to some embodiments, the preset data identifier may be a service node identifier, so that data corresponding to a relevant service node may be read from the shared storage space; the preset data identification may also be an identification regarding a data attribute, whereby data having the 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 in one or more service nodes, establishing 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, and the writing or reading of the data unique to the service node by the service logic corresponding to the service node is facilitated.
According to some embodiments, in response to deleting at least one of the one or more service nodes, at least one node storage space associated with the at least one service node is deleted. Therefore, when at least one service node of the one or more service nodes is deleted, the storage space occupied by the storage space of the at least one node associated with the at least one service node can be released in time.
In accordance with some embodiments, in the event that all of the service nodes in the context chain are deleted, the shared memory 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 to the shared storage space. Thus, when executing the path tracing business of browsing the page, the recorded page path tracing information can be stored in the shared memory space associated with the context chain.
According to some embodiments, as shown in FIG. 3, path tracking of a browsing page may be achieved by:
in response to the user initializing the application program at the terminal, as described in step S201, a context chain for path tracking of the browsed page and a readable and writable shared storage space associated with the context chain are created, where the context chain includes a service node corresponding to the first page (i.e., service logic) browsed by the user, 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 in the context chain corresponding to the jump to the second page (i.e., service logic);
in response to the service node having the function attribute of the path information record, calling 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, where the function performed by the page tracking function may include recording a last service node, a recorded browsing page path, a current service node, and a currently recorded browsing page path, and meanwhile, the page tracking function may also record other more detailed information including a user browsing duration, browsing times, and the like;
specifically, the function chain may send a read request to the shared memory space to obtain shared data, such as a last service node stored in the shared memory space and a recorded browsing page path;
decoding the shared data in binary data formats such as the last service node stored in the shared storage space and the recorded browsing page path into a data format required by the 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 → KViewController → 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 the shared data obtained from the shared memory space;
the function chain sends the recorded data to the shared storage space as shared data, for example, as described in step S202, an encoder connected to the shared storage space is used to encode the shared data into a binary data format and store the binary data format in the shared storage space, and the shared data may continue to be read by a function chain created by a subsequent service node, or may be read by other service logics outside the function chain.
When the user continues to execute page jump in the application program, correspondingly adding a corresponding new service node in the context chain, and responding to the function attribute of the newly added service node, and calling a corresponding function chain function to create a function chain;
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 is to be understood that the above path tracing of the browsing page is only an exemplary embodiment of the present disclosure, and the business logic management method disclosed in the present disclosure may also be used in a variety of businesses including event forwarding, event responding, and the like, which is not limited herein.
According to another aspect of the present disclosure, as shown in fig. 4, there is further provided a business logic management apparatus 400, where the apparatus 400 may include a first creating unit 401 configured to create a context chain and a read-write shared storage space associated with the context chain in response to a first trigger condition being met, where the context chain includes one or more business nodes; a first writing unit 402 configured to store the shared data of the context chain to the shared memory space.
According to some embodiments, the shared data comprises 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 storage 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; a writing subunit 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; the acquisition unit is configured to acquire 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 creating unit thereof further comprises: an adding unit configured to add a new service node in the context chain in response to a second trigger condition being satisfied; the device further comprises: a second creating unit configured to, in response to determining that the new service node has an associated function attribute, create a function chain corresponding to the function attribute based on a preset rule, the function chain being capable of reading required shared data from the shared storage space.
According to some embodiments, wherein the function chain comprises a plurality of functions including at least one function to be verified, the apparatus further comprising: a transmission unit configured to, for each to-be-verified function of the at least one to-be-verified function, in response to determining that a verification result of output data of the to-be-verified function does not pass, the to-be-verified function does not transmit the output data to a next function adjacent to the to-be-verified function.
According to some embodiments, the transmission unit is further configured to, in response to determining that the verification result of the output data of the function to be verified is passed, transmit the output data to a next function adjacent to the function to be verified by the function to be verified.
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; a second writing unit configured to store the node data of the service node to the node storage space.
According to some embodiments, the apparatus further comprises: 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 comprises an application initialization, and the first writing unit is further configured to store a page tracking result of the application to the shared memory space.
According to another aspect of the present disclosure, there is also provided 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 above method.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium having a computer program stored thereon, 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, there is also provided a computer program product comprising a computer program, wherein the computer program realizes the steps of the above-mentioned method when executed by a processor.
Referring to fig. 5, a block diagram of a structure of an electronic device 500, which 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 device is 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 comprises a computing unit 501 which may perform various appropriate actions and processes in accordance with 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 calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of 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, and the input unit 506 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls 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 controller. Output unit 507 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 508 may include, but is not limited to, a magnetic disk, an optical disk. 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-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. 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 in 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 the RAM 503 and executed by the 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 circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes 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 codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. 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. A 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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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 understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely exemplary embodiments or examples and that the scope of the present invention is not limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in 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 with equivalent elements that appear after the present disclosure.

Claims (25)

1. A business logic management method comprises the following steps:
in response to a first trigger condition being met, creating a context chain and a read-write shared storage space associated with the context chain, wherein the context chain comprises one or more service nodes;
storing the shared data of the context chain to the shared storage space.
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 according to any one of claims 1 to 3, wherein the data stored in the shared memory space is in a first preset data format,
the storing the shared data of the context chain to the shared storage space comprises:
encoding the shared data into the first preset data format;
and writing the shared data coded into the first preset data format into the shared storage space.
5. The method of claim 4, wherein the method further comprises:
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 identification from the shared storage space;
and decoding the data corresponding to the preset data identifier into the second preset data format.
6. 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 following steps:
and in response to determining that the new service node has the relevant function attribute, creating a function chain corresponding to the function attribute based on a preset rule, wherein the function chain can read required shared data from the shared storage space.
7. The method of claim 6, wherein the function chain includes a plurality of functions including at least one function to be verified, the method further comprising:
for each to-be-verified functional part in the at least one to-be-verified functional part, in response to determining that the verification result of the output data of the to-be-verified functional part does not pass, the to-be-verified functional part does not transmit the output data to a next functional part adjacent to the to-be-verified functional part.
8. The method of claim 7, further comprising:
and in response to determining that the verification result of the output data of the functional part to be verified is passed, the functional part to be verified transmits the output data to the next functional part adjacent to the functional part to be verified.
9. The method of claim 1, further comprising:
for each 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.
10. The method of claim 9, the method further comprising:
in response to deleting at least one of the one or more service nodes, deleting at least one node storage space associated with the at least one service node.
11. The method of claim 1, wherein the first trigger condition comprises an application initialization,
the storing the shared data of the context chain to the shared storage space comprises:
and storing the page tracking result of the application program to the shared storage space.
12. A business logic management apparatus, comprising:
a first creating unit 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 met, wherein the context chain includes one or more service nodes;
a first write unit configured to store shared data of the context chain to the shared storage space.
13. The apparatus of claim 12, wherein the shared data comprises attribute data of the context chain.
14. The apparatus of claim 13, wherein the attribute data comprises a length of a context chain.
15. The apparatus according to any one of claims 12 to 14, wherein the data stored in the shared storage space is in a first preset data format,
the first writing unit includes:
an encoding unit configured to encode the shared data into the first preset data format;
a writing subunit configured to write the shared data encoded into the first preset data format into the shared storage space.
16. The apparatus of claim 15, wherein 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;
the acquisition unit is configured to acquire 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.
17. The apparatus of claim 12, wherein the first creating 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 satisfied;
the device further comprises:
a second creating unit configured to, in response to determining that the new service node has an associated function attribute, create a function chain corresponding to the function attribute based on a preset rule, the function chain being capable of reading required shared data from the shared storage space.
18. The apparatus of claim 17, wherein the function chain comprises a plurality of functions including at least one function to be verified, the apparatus further comprising:
a transmission unit configured to, for each to-be-verified function of the at least one to-be-verified function, in response to determining that a verification result of output data of the to-be-verified function does not pass, the to-be-verified function does not transmit the output data to a next function adjacent to the to-be-verified function.
19. The apparatus of claim 18, wherein the transmission unit is further configured to, in response to determining that the verification result of the output data of the function to be verified is passed, the function to be verified transmits the output data to a next function adjacent to the function to be verified.
20. The apparatus of claim 12, 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;
a second writing unit configured to store the node data of the service node to the node storage space.
21. The apparatus of claim 20, the apparatus further comprising:
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.
22. The apparatus of claim 12, wherein the first trigger condition comprises an application initialization,
the first writing unit is further configured to store a page tracking result of the application program to the shared memory space.
23. 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-11.
24. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of the method of any of claims 1-11.
25. A computer program product comprising a computer program, wherein the computer program realizes the steps of the method of any one of claims 1-11 when executed by a processor.
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 true CN112764828A (en) 2021-05-07
CN112764828B 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 (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060190551A1 (en) * 2005-02-21 2006-08-24 Hiroki Kato Network system, element thereof and context management method
CN1972200A (en) * 2005-02-21 2007-05-30 索尼计算机娱乐公司 Network system, and constitutive component therefor, and visualization method for network
US20170115921A1 (en) * 2015-10-27 2017-04-27 International Business Machines Corporation Sharing an accelerator context across multiple processes
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

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060190551A1 (en) * 2005-02-21 2006-08-24 Hiroki Kato Network system, element thereof and context management method
CN1972200A (en) * 2005-02-21 2007-05-30 索尼计算机娱乐公司 Network system, and constitutive component therefor, and visualization method for network
US20170115921A1 (en) * 2015-10-27 2017-04-27 International Business Machines Corporation Sharing an accelerator context across multiple processes
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
ARTECH: ""以上下文(context)的形式创建一个共享数据的容器"", 《WWW.CNBLOGS.COM/ARTECH/ARCHIVE/2013/04/14/EXECUTION-CONTEXT.HTML》 *
刘鸽 等: ""多分区环境下多核操作系统结构研究"", 《信息安全与技术》 *
郭强: ""Context:业务流程共享变量"", 《GOFRAME.ORG/PLUGINS/SERVLET/MOBILE?CONTENTID=3672552&UTM_SOURCE=WECHAT_SESSION&UTM_MEDIUM=SOCIAL&UTM_OI=640535696775974912#CONTENT/VIEW/3672552》 *

Also Published As

Publication number Publication date
CN112764828B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN113986788A (en) Data processing method and device, chip, electronic device and medium
CN112882734A (en) Upgrading method and device, computer equipment and medium
CN113485820A (en) Task scheduling system and implementation method, device and medium thereof
CN114035829A (en) Page component updating method and device, electronic equipment and storage medium
CN112948018A (en) Dynamic library loading method, device, equipment and medium for small program
CN112732312A (en) Method and device for updating application program, electronic equipment and medium
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
CN113641929B (en) Page rendering method, device, electronic equipment and computer readable storage medium
CN113641693B (en) Data processing method and device of streaming computing system, electronic equipment and medium
CN113126928A (en) File moving method and device, electronic equipment and medium
CN113110846A (en) Method and device for acquiring environment variable
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
CN116016373A (en) Method, device, equipment and medium for sending data processing request
CN115098165B (en) Data processing method, device, chip, equipment and medium
CN113010383B (en) Error log filtering method, device, electronic equipment and readable medium
US10606939B2 (en) Applying matching data transformation information based on a user's editing of data within a document
CN113961189A (en) Webpage editing method and device
CN118069546A (en) Data reading method, data processing system, device and medium
CN115796254A (en) Data processing method, device, chip, equipment and medium
CN115981839A (en) Memory allocation method and device, equipment and medium
CN116383534A (en) Page preloading method, device, electronic equipment and medium
CN115905257A (en) Database updating method and device, equipment and 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