[go: up one dir, main page]

CN113626102A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113626102A
CN113626102A CN202110907854.8A CN202110907854A CN113626102A CN 113626102 A CN113626102 A CN 113626102A CN 202110907854 A CN202110907854 A CN 202110907854A CN 113626102 A CN113626102 A CN 113626102A
Authority
CN
China
Prior art keywords
basic component
service
node
basic
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110907854.8A
Other languages
Chinese (zh)
Inventor
陈彰
马铭远
杨耀华
张振华
张德阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110907854.8A priority Critical patent/CN113626102A/en
Publication of CN113626102A publication Critical patent/CN113626102A/en
Pending legal-status Critical Current

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/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • 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/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/44568Immediately runnable code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明实施例提供了一种数据处理方法、装置、电子设备及存储介质,涉及计算机技术领域。该方法包括:读取预先配置的业务描述配置信息,业务描述配置信息中包括执行业务所需的多个基础组件标识、每个基础组件的业务参数以及各基础组件之间的运行顺序。其中,每个基础组件中封装有不同的可复用功能代码。然后对所述多个基础组件标识对应的基础组件进行实例化,并将每个基础组件的业务参数传入对应的基础组件,对各基础组件进行初始化,按照业务描述配置信息包括的各基础组件之间的运行顺序,运行各基础组件。可以降低用户开发量,提高开发效率。

Figure 202110907854

Embodiments of the present invention provide a data processing method, apparatus, electronic device, and storage medium, and relate to the technical field of computers. The method includes: reading pre-configured service description configuration information, where the service description configuration information includes multiple basic component identifiers required to execute the service, service parameters of each basic component and the running sequence among the basic components. Among them, different reusable function codes are encapsulated in each basic component. Then, instantiate the basic components corresponding to the plurality of basic component identifiers, transfer the business parameters of each basic component to the corresponding basic component, initialize each basic component, and configure each basic component included in the information according to the business description. The order in which the underlying components are run. It can reduce the amount of user development and improve development efficiency.

Figure 202110907854

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
In the software development process, a developer can develop codes according to business requirements, and after the development is completed, a test engineer tests and confirms that the code function meets the business requirements and no holes are left, and then the codes are released online.
At present, a developer has many repeated development works when developing codes. For example, in a requirement, access to a middleware or an external interface is required, so a developer needs to develop code for implementing access to the middleware or to the external interface. In another new requirement, access to the same middleware or the same external interface is required. In this case, the developer needs to repeatedly develop function codes that have been previously developed to access the middleware or the external interface, resulting in inefficient development.
Disclosure of Invention
Embodiments of the present invention provide a data processing method, an apparatus, an electronic device, and a storage medium, so as to solve the problem of low development efficiency. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a data processing method, where the method is applied to an electronic device, and the method includes:
reading service description configuration information configured in advance, wherein the service description configuration information comprises a plurality of basic component identifications required by service execution, service parameters of each basic component and an operation sequence among the basic components; wherein, each basic component is packaged with different reusable function codes;
instantiating the basic components corresponding to the multiple basic component identifications, transmitting the service parameters of each basic component into the corresponding basic component, and initializing each basic component;
and operating each basic component according to the operation sequence among the basic components included in the service description configuration information.
In a possible implementation, the service description configuration information includes at least one pipeline, where the pipeline includes a plurality of node fields, and each node field includes an identifier of a basic component, a service parameter, and a component type;
the instantiating the basic components corresponding to the multiple basic component identifications, transmitting the service parameters of each basic component into the corresponding basic component, and initializing each basic component includes:
performing the following operations for each node field that the pipeline comprises:
searching a basic component corresponding to the component type included in the node field, and instantiating the searched basic component;
and transmitting the service parameters included in the node field into the instantiated basic component to complete the initialization of the searched basic component.
In a possible implementation manner, the pipeline further includes an identifier of a start node, and each node field further includes an identifier of a basic component of a subsequent node;
the operating each basic component according to the operation sequence between each basic component included in the service description configuration information includes:
acquiring an initial node identifier included by the pipeline;
operating the basic component corresponding to the starting node identification;
searching a node field corresponding to the initial node identification from the pipeline, and acquiring a subsequent node identification included in the node field corresponding to the initial node identification;
operating the basic component corresponding to the acquired subsequent node identifier;
and circularly executing the steps of acquiring the subsequent node identification from the node field corresponding to the currently executed basic component, and operating the basic component corresponding to the acquired subsequent node identification until the subsequent node identification does not exist in the node field corresponding to the currently operated basic component.
In a possible implementation manner, before reading the service description configuration information configured in advance, the method further includes:
displaying a business arrangement interface, wherein the business arrangement interface comprises a basic component list, a business arrangement area and a business parameter configuration area;
detecting the arrangement operation of a user in the service arrangement area, wherein the arrangement operation comprises the selection operation of the basic components in the basic component list and the connection operation between the selected basic components;
receiving the service parameters configured for each selected basic component by the user in the service parameter configuration area;
and generating and storing the service description configuration information based on the arrangement operation of the user in the service arrangement area and the service parameters configured by the user.
In a second aspect, an embodiment of the present application provides a data processing apparatus, where the apparatus is applied to an electronic device, and the apparatus includes:
the reading module is used for reading service description configuration information which is configured in advance, wherein the service description configuration information comprises a plurality of basic component identifications required by service execution, service parameters of each basic component and an operation sequence among the basic components; wherein, each basic component is packaged with different reusable function codes;
the instantiation and initialization module is used for instantiating the basic components corresponding to the plurality of basic component identifications, transmitting the service parameters of each basic component into the corresponding basic component and initializing each basic component;
and the operation module is used for operating each basic component according to the operation sequence among the basic components included in the service description configuration information.
In a possible implementation, the service description configuration information includes at least one pipeline, where the pipeline includes a plurality of node fields, and each node field includes an identifier of a basic component, a service parameter, and a component type;
the instantiation and initialization module is specifically configured to:
performing the following operations for each node field that the pipeline comprises:
searching a basic component corresponding to the component type included in the node field, and instantiating the searched basic component;
and transmitting the service parameters included in the node field into the instantiated basic component to complete the initialization of the searched basic component.
In a possible implementation manner, the pipeline further includes an identifier of a start node, and each node field further includes an identifier of a basic component of a subsequent node;
the operation module is specifically configured to:
acquiring an initial node identifier included by the pipeline;
operating the basic component corresponding to the starting node identification;
searching a node field corresponding to the initial node identification from the pipeline, and acquiring a subsequent node identification included in the node field corresponding to the initial node identification;
operating the basic component corresponding to the acquired subsequent node identifier;
and circularly executing the steps of acquiring the subsequent node identification from the node field corresponding to the currently executed basic component, and operating the basic component corresponding to the acquired subsequent node identification until the subsequent node identification does not exist in the node field corresponding to the currently operated basic component.
In one possible implementation, the apparatus further includes:
the service editing module is used for editing a service parameter of the service parameter configuration area;
the detection module is used for detecting the arrangement operation of a user in the service arrangement area, wherein the arrangement operation comprises the selection operation of the basic components in the basic component list and the connection operation between the selected basic components;
a receiving module, configured to receive the service parameters configured for each selected basic component by the user in the service parameter configuration area;
and the generating module is used for generating and storing the service description configuration information based on the arrangement operation of the user in the service arrangement area and the service parameters configured by the user.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and a processor for implementing any of the above-described data processing method steps when executing the program stored in the memory.
In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the data processing method described in the first aspect.
In a fifth aspect, embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the data processing method described in the first aspect.
The embodiment of the invention has the following beneficial effects:
by adopting the data processing method, the data processing device, the electronic device and the storage medium provided by the embodiment of the application, since the service description configuration information configured in advance includes a plurality of basic component identifiers required for executing the service, the service parameters of each basic component and the operation sequence among the basic components, the instantiation of the basic components required for executing the service can be realized through the basic component identifiers included in the service description configuration information. Furthermore, the service parameters of each basic component are transmitted into the corresponding basic component, and each basic component can be initialized, so that the reusable function codes packaged in the basic components are applied to specific service scenes. And further, operating each basic component according to the operation sequence among the basic components included in the service description configuration information, thereby realizing the execution of the software service logic. Therefore, in the process, only the service description configuration information needs to be configured in advance, the reusable function codes are encapsulated in the basic components related to the service description configuration information, software development can be realized through combination of a plurality of basic components and configuration of service parameters of each basic component, the work of repeatedly developing the codes is reduced, and the development efficiency can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another data processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another data processing method according to an embodiment of the present invention;
FIG. 4 is an exemplary diagram of a business orchestration interface according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
An embodiment of the present application provides a data processing method applied to an electronic device, and as shown in fig. 1, the method includes:
s101, reading service description configuration information configured in advance, wherein the service description configuration information comprises a plurality of basic component identifications required by service execution, service parameters of each basic component and an operation sequence among the basic components; wherein each basic component is packaged with different reusable function codes.
S102, instantiating the basic components corresponding to the multiple basic component identifications, transmitting the business parameters of each basic component into the corresponding basic component, and initializing each basic component.
S103, operating the basic components according to the operation sequence among the basic components included in the service description configuration information.
By adopting the data processing method provided by the embodiment of the application, since the service description configuration information configured in advance comprises a plurality of basic component identifications required for executing the service, the service parameters of each basic component and the operation sequence among the basic components, the instantiation of the basic components required for executing the service can be realized through the basic component identifications included by the service description configuration information. Furthermore, the service parameters of each basic component are transmitted into the corresponding basic component, and each basic component can be initialized, so that the reusable function codes packaged in the basic components are applied to specific service scenes. And further, operating each basic component according to the operation sequence among the basic components included in the service description configuration information, thereby realizing the execution of the software service logic. Therefore, in the process, only the service description configuration information needs to be configured in advance, the reusable function codes are encapsulated in the basic components related to the service description configuration information, software development can be realized through combination of a plurality of basic components and configuration of service parameters of each basic component, the work of repeatedly developing the codes is reduced, and the development efficiency can be improved.
For the above S101, the service description configuration information may be stored in the form of a file, and may also be referred to as a service description configuration file.
Each base component encapsulates a different reusable functional code. For example, the function code for accessing the message middleware may be packaged as a base component, and the function code for accessing an external interface may be packaged as a base component.
For the above S102, the electronic device may determine, according to the basic component identifier included in the service description configuration information, the basic component corresponding to each basic component identifier, open up a storage space for each basic component in the memory, and complete instantiation of each basic component. After the instantiation of each basic component is completed, the service parameters in the service description configuration information are transmitted into each instantiated basic component, and an initialization (init) method is called to realize the initialization of each basic component.
After the initialization of each basic component is completed, the method logic packaged in each basic component can be operated according to the operation sequence among the basic components, so that the execution of the service logic is realized.
In an embodiment of the present application, the service description configuration information includes at least one pipeline (pipeline), and the pipeline includes a plurality of node fields, and each node field includes an identifier of a basic component, a service parameter, and a component type. The step S102 of instantiating the basic component corresponding to the multiple basic component identifiers, transmitting the service parameter of each basic component to the corresponding basic component, and initializing each basic component includes:
the following operations are performed for each node field that pipeline includes:
and searching the basic component corresponding to the component type included in the node field, instantiating the searched basic component, transmitting the service parameters included in the node field into the instantiated basic component, and finishing the initialization of the searched basic component.
In this embodiment of the present application, the service description information may include pipelines, the pipelines are an array, each element included in the array is a pipeline, and a service may include multiple pipelines.
The basic component identifiers in a pipeline, which may also be referred to as node identifiers, each basic component identifier included in a pipeline represents each node that constitutes the pipeline. A basic component can be uniquely determined through the component type included in a node field, and the basic component can be applied to a specific business process after business parameters in the node field are transmitted into the basic component.
Optionally, the pipeline further includes a start node identifier, each node field further includes a base component identifier of a subsequent node, and the base component identifier of the subsequent node included in each node field may reflect an operation sequence between the base components. On this basis, as shown in fig. 2, in the above S103, running the basic components according to the running sequence between the basic components included in the service description configuration information may specifically be implemented as:
and S1031, obtaining the start node identification included by the pipeline.
The starting node identification is used for identifying a node where a first basic component needing to be operated in pipeline is located.
In the embodiment of the present application, the starting node identifier included in the pipeline may be one or more. For example, if the first step of executing a service is to call two different interfaces to obtain different parameters, respectively, pipeline may include two start node identifiers, one start node identifier corresponding to the basic component for calling interface a to obtain parameter a, and the other start node identifier corresponding to the basic component for calling interface B to obtain parameter B.
S1032, operating the corresponding basic component of the starting node identification.
The node field corresponding to the starting node identification can be found through the starting node identification included by pipeline, and the initialized basic component corresponding to the found node field is operated.
S1033, searching the node field corresponding to the starting node identification from pipeline, and acquiring the successor node identification included in the node field corresponding to the starting node identification.
The subsequent node identifier included in the node field corresponding to the starting node identifier is used for indicating the identifier of the next node field to be searched after the basic component corresponding to the starting node is executed.
Optionally, each node field may include one or more successor node identifications.
And S1034, operating the basic component corresponding to the acquired subsequent node identifier.
The electronic equipment can search the node field corresponding to the subsequent node identification through the acquired subsequent node identification, and then operate the basic component corresponding to the searched node field.
And S1035, circularly executing the steps of acquiring the subsequent node identification from the node field corresponding to the currently executed basic component, and operating the basic component corresponding to the acquired subsequent node identification until no subsequent node identification exists in the node field corresponding to the currently operated basic component.
And if the basic component corresponding to the subsequent node field is operated, the electronic equipment can determine the next basic component to be operated according to the subsequent node identifier included in the node field.
In an embodiment of the present application, the service description configuration information may include a plurality of pipeline, and when the basic components are run according to a running sequence between the basic components included in the service description configuration information, the steps of S1031 to S1035 described above need to be performed for each pipeline.
The following describes a method for operating each basic component according to service description configuration information with reference to a specific example, where the service description configuration information is shown as an example.
Figure BDA0003202387080000091
Figure BDA0003202387080000101
Wherein, the "id" play _ control _ sync "is used to indicate that the identity (id) of the pipeline is play _ control _ sync;
max _ pool _ threads ":1 in the impl _ config field is used to indicate that the maximum thread pool number of the pipeline is 1.
The "min _ pool _ threads" in the impl _ config field is 1 to indicate that the minimum thread pool number for representing the pipeline is 1.
"nodes" { … } is a node (nodes) field; wherein, the "1": … }, "2": … }, "3": … }, and "4": … } respectively represent the node 1, the node 2, the node 3, and the node 4 contained in the pipeline. The specific contents included in the nodes 1, 2 and 4 are omitted in the above example, and the specific contents included in the node 3 are only exemplarily shown.
The { … } field represents the service parameters of the basic component corresponding to the node 3 in the current service scenario. For example, base _ sleep _ ms ":10, included in the impl _ config field, is used to indicate that the sleep time is 10 ms; "data _ center": Test "is used to indicate that the data center where the service is located is Test; "hao123" is used to indicate that the authentication password (password) is "hao 123"; "QPS":5000 is used to represent the query-per-second (QPS) upper limit for a service. "retry" 5 is used to indicate that the number of retries (retry) after timeout is 5. 10000 is used to indicate that the timeout (timeout) time is 10000 milliseconds; "user": mems "is used to denote that the user (user) name is mems.
Next ": 2" included in nodes "3": … "is a next (next) node identification to indicate that the successor node to node 3 is node 2. "type" QipuReadServiceNode "is a basic component type (type) for indicating that the basic component type corresponding to the node 3 is QipuReadServiceNode.
"start _ points" [ "3" ], is a start node field for indicating that the start node is node 3.
"type" DefaultPIPeline "is used to indicate that the type of the pipeline is the default pipeline.
In the embodiment of the present application, the basic component corresponding to the node 3 that runs first can be found by the starting node identifier "start _ points" included in pipeline. Then the following node field "next" of the node 3: and 2, finding the corresponding basic component of the subsequent node 2. Assume that the successor node of node "2" is "1" and the successor node of node "1" is "4", and assume that the successor node identification does not exist in the node field of node "4". And then, the node 4 is found through the subsequent node field of the node 2, and because the node 4 has no subsequent node, after the basic component corresponding to the node 4 is operated, all basic components required by the representative service function are operated, and the whole service function is realized.
In order to implement the method flow shown in fig. 1, firstly, the service description configuration information needs to be generated, and the following describes a process of generating the service description configuration information, as shown in fig. 3, before S101, reading the service description configuration information, the method further includes:
s301, displaying a service arrangement interface, wherein the service arrangement interface comprises a basic component list, a service arrangement area and a service parameter configuration area.
The business orchestration interface may be implemented by a visualization orchestration engine, for example, as shown in fig. 4, a basic component list in the business orchestration interface shows a plurality of packaged basic components, and each basic component may serve as a reusable function module.
S302, detecting the arrangement operation of the user in the service arrangement area, wherein the arrangement operation comprises the selection operation of the basic components in the basic component list and the connection operation between the selected basic components.
The selection operation of the user on the basic component in the basic component list may be a click operation or a drag operation, which is not limited in the embodiment of the present application. A user can place a plurality of basic components in the basic component list in a business arrangement area in a clicking or dragging mode, and then appoint a connection mode among the basic components in an arrow mode, so that the running sequence among the basic components is appointed. Accordingly, the electronic device may recognize the above-described arrangement operation of the user.
For example, a user selects a basic component a and a basic component c, drags the basic component a and the basic component c to a service arrangement area, and links the basic component a to the basic component c through an arrow by the user, which represents that the user wants to operate the basic component c after the basic component a is operated.
It should be noted that each basic component included in the basic component list can be reused, so that if the same function needs to be used multiple times in one service requirement, the user can select the same basic component multiple times, and then different service parameters can be configured for the same basic component selected multiple times.
S303, receiving the service parameters configured for each selected basic component by the user in the service parameter configuration area.
The service parameter configuration area shows configuration items of the basic component which need to be configured. The user selects a basic component in the logical layout area, for example, the user clicks a basic component in the logical layout area, and the electronic device displays the configuration item to be configured for the basic component in the service parameter configuration area. The user can fill in the service parameters corresponding to the configuration items in the attribute configuration area.
For example, in fig. 4, it is assumed that a user clicks the basic component ReadService in the logic arrangement region, and a representative user selects to perform service parameter configuration on the basic component ReadService, and accordingly, the service parameter configuration region displays a configuration item corresponding to the basic component ReadService: username, data center, authentication password, qps, timeout time, sleep time.
S304, generating and storing service description configuration information based on the arranging operation of the user in the service arranging area and the service parameters configured by the user.
In one embodiment, the user may click the save button after completing the service orchestration and service parameter configuration. And if the electronic equipment identifies the saving operation of the user, generating and storing service description configuration information based on the arrangement operation of the user and the service parameters of the user.
After the service description configuration information is generated, the service description configuration information can be stored in a database, such as mysql and redis; the service description configuration information may also be stored in a configuration center, such as zookeeper, nacos, or the service description configuration information may also be stored in a server disk.
By adopting the embodiment of the application, the electronic equipment displays the service arrangement interface for the user, so that the user can select and connect the basic components required by the service in the service arrangement area, determine the execution sequence among the basic components and configure the service parameters in the service parameter configuration area, thereby enabling the multiplexed basic components to be applied to specific service scenes. After the user completes the arrangement operation and the parameter configuration operation, the electronic device can generate and store corresponding service description configuration information, and then the execution of the service can be realized based on the service description configuration information. Therefore, a user can complete service development only by simple arrangement operation without developing codes one by one based on each requirement, so that the development efficiency can be greatly improved, for example, the development time of several days can be shortened to within 1 hour. And the basic components can be repeatedly used, so that repeated development work of developers is avoided.
In the embodiment of the application, if the code needs to be optimized, only the basic component where the code needs to be optimized is needed to be modified, and compared with the prior art that the whole service code is modified and tested again, the method of the embodiment of the application is more convenient and faster, and the modification efficiency can be improved.
Moreover, if the dependent components need to be upgraded, if a method of the related art is adopted, codes need to be modified one by one for each project, the efficiency is low, and if a plurality of projects exist, the condition of modification omission is easy to occur, and a safety problem is caused. By adopting the method of the embodiment of the application, the code of the basic component can be directly modified, correspondingly, the modified code in the basic component can be directly called according to the service description configuration information when the service is executed, each service does not need to be modified one by one, the occurrence of omission is avoided, and the safety is improved.
As shown in fig. 5, the electronic device provided in the embodiment of the present invention includes a service orchestration engine, a service configuration storage module, and a service execution engine. The business arrangement engine is configured to execute the above S301 to S304, the business description configuration information generated by the business arrangement engine is stored in the business configuration storage, and the business execution engine is configured to execute the above S101 to S103.
Based on the same inventive concept, an embodiment of the present application further provides a data processing apparatus, which is applied to an electronic device, as shown in fig. 6, and includes:
a reading module 601, configured to read preconfigured service description configuration information, where the service description configuration information includes multiple basic component identifiers required for executing a service, a service parameter of each basic component, and an operation sequence between the basic components; wherein, each basic component is packaged with different reusable function codes;
an instantiation and initialization module 602, configured to instantiate a base component corresponding to multiple base component identifiers, transmit a service parameter of each base component to the corresponding base component, and initialize each base component;
the running module 603 is configured to run the basic components according to the running sequence between the basic components included in the service description configuration information.
Optionally, the service description configuration information includes at least one pipeline, where the pipeline includes a plurality of node fields, and each node field includes an identifier of a basic component, a service parameter, and a component type;
the instantiation and initialization module 602 is specifically configured to:
the following operations are performed for each node field that pipeline includes:
searching a basic component corresponding to the component type included in the node field, and instantiating the searched basic component;
and transmitting the service parameters included in the node field into the instantiated basic component to complete the initialization of the searched basic component.
Optionally, pipeline further includes a start node identifier, and each node field further includes a base component identifier of a subsequent node;
the operation module 603 is specifically configured to:
acquiring an initial node identifier included by pipeline;
operating a basic component corresponding to the initial node identification;
searching a node field corresponding to the initial node identification from pipeline, and acquiring a subsequent node identification included in the node field corresponding to the initial node identification;
operating the basic component corresponding to the acquired subsequent node identifier;
and circularly executing the steps of acquiring the subsequent node identification from the node field corresponding to the currently executed basic component, and operating the basic component corresponding to the acquired subsequent node identification until the subsequent node identification does not exist in the node field corresponding to the currently operated basic component.
Optionally, the apparatus further comprises:
the display module is used for displaying a business arrangement interface, and the business arrangement interface comprises a basic component list, a business arrangement area and a business parameter configuration area;
the detection module is used for detecting the arrangement operation of a user in the service arrangement area, wherein the arrangement operation comprises the selection operation of the basic components in the basic component list and the connection operation between the selected basic components;
the receiving module is used for receiving the service parameters configured for each selected basic component by the user in the service parameter configuration area;
and the generating module is used for generating and storing the service description configuration information based on the arrangement operation of the user in the service arrangement area and the service parameters configured by the user.
By adopting the data processing method provided by the embodiment of the application, since the service description configuration information configured in advance comprises a plurality of basic component identifications required for executing the service, the service parameters of each basic component and the operation sequence among the basic components, the instantiation of the basic components required for executing the service can be realized through the basic component identifications included by the service description configuration information. Furthermore, the service parameters of each basic component are transmitted into the corresponding basic component, and each basic component can be initialized, so that the reusable function codes packaged in the basic components are applied to specific service scenes. And further, operating each basic component according to the operation sequence among the basic components included in the service description configuration information, thereby realizing the execution of the software service logic. Therefore, in the process, only the service description configuration information needs to be configured in advance, the reusable function codes are encapsulated in the basic components related to the service description configuration information, software development can be realized through combination of a plurality of basic components and configuration of service parameters of each basic component, the work of repeatedly developing the codes is reduced, and the development efficiency can be improved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the method steps in the above-described method embodiments when executing the program stored in the memory 703.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the computer is caused to execute the data processing method described in any one of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the data processing method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, the electronic apparatus and the storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A data processing method is applied to an electronic device, and the method comprises the following steps:
reading service description configuration information configured in advance, wherein the service description configuration information comprises a plurality of basic component identifications required by service execution, service parameters of each basic component and an operation sequence among the basic components; wherein, each basic component is packaged with different reusable function codes;
instantiating the basic components corresponding to the multiple basic component identifications, transmitting the service parameters of each basic component into the corresponding basic component, and initializing each basic component;
and operating each basic component according to the operation sequence among the basic components included in the service description configuration information.
2. The method of claim 1, wherein the traffic description configuration information comprises at least one pipeline, wherein the pipeline comprises a plurality of node fields, and wherein each node field comprises an identity of a base component, a traffic parameter, and a component type;
the instantiating the basic components corresponding to the multiple basic component identifications, transmitting the service parameters of each basic component into the corresponding basic component, and initializing each basic component includes:
performing the following operations for each node field that the pipeline comprises:
searching a basic component corresponding to the component type included in the node field, and instantiating the searched basic component;
and transmitting the service parameters included in the node field into the instantiated basic component to complete the initialization of the searched basic component.
3. The method of claim 2, wherein the pipeline further comprises a starting node identification, and wherein each node field further comprises a base component identification of a successor node;
the operating each basic component according to the operation sequence between each basic component included in the service description configuration information includes:
acquiring an initial node identifier included by the pipeline;
operating the basic component corresponding to the starting node identification;
searching a node field corresponding to the initial node identification from the pipeline, and acquiring a subsequent node identification included in the node field corresponding to the initial node identification;
operating the basic component corresponding to the acquired subsequent node identifier;
and circularly executing the steps of acquiring the subsequent node identification from the node field corresponding to the currently executed basic component, and operating the basic component corresponding to the acquired subsequent node identification until the subsequent node identification does not exist in the node field corresponding to the currently operated basic component.
4. The method according to claim 1, wherein before reading the preconfigured service description configuration information, the method further comprises:
displaying a business arrangement interface, wherein the business arrangement interface comprises a basic component list, a business arrangement area and a business parameter configuration area;
detecting the arrangement operation of a user in the service arrangement area, wherein the arrangement operation comprises the selection operation of the basic components in the basic component list and the connection operation between the selected basic components;
receiving the service parameters configured for each selected basic component by the user in the service parameter configuration area;
and generating and storing the service description configuration information based on the arrangement operation of the user in the service arrangement area and the service parameters configured by the user.
5. A data processing apparatus, wherein the apparatus is applied to an electronic device, the apparatus comprising:
the reading module is used for reading service description configuration information which is configured in advance, wherein the service description configuration information comprises a plurality of basic component identifications required by service execution, service parameters of each basic component and an operation sequence among the basic components; wherein, each basic component is packaged with different reusable function codes;
the instantiation and initialization module is used for instantiating the basic components corresponding to the plurality of basic component identifications, transmitting the service parameters of each basic component into the corresponding basic component and initializing each basic component;
and the operation module is used for operating each basic component according to the operation sequence among the basic components included in the service description configuration information.
6. The apparatus of claim 5, wherein the traffic description configuration information comprises at least one pipeline, wherein the pipeline comprises a plurality of node fields, and wherein each node field comprises an identity of a base component, a traffic parameter, and a component type;
the instantiation and initialization module is specifically configured to:
performing the following operations for each node field that the pipeline comprises:
searching a basic component corresponding to the component type included in the node field, and instantiating the searched basic component;
and transmitting the service parameters included in the node field into the instantiated basic component to complete the initialization of the searched basic component.
7. The apparatus of claim 6, wherein the pipeline further comprises a starting node identification, and wherein each node field further comprises a base component identification of a successor node;
the operation module is specifically configured to:
acquiring an initial node identifier included by the pipeline;
operating the basic component corresponding to the starting node identification;
searching a node field corresponding to the initial node identification from the pipeline, and acquiring a subsequent node identification included in the node field corresponding to the initial node identification;
operating the basic component corresponding to the acquired subsequent node identifier;
and circularly executing the steps of acquiring the subsequent node identification from the node field corresponding to the currently executed basic component, and operating the basic component corresponding to the acquired subsequent node identification until the subsequent node identification does not exist in the node field corresponding to the currently operated basic component.
8. The apparatus of claim 5, further comprising:
the service editing module is used for editing a service parameter of the service parameter configuration area;
the detection module is used for detecting the arrangement operation of a user in the service arrangement area, wherein the arrangement operation comprises the selection operation of the basic components in the basic component list and the connection operation between the selected basic components;
a receiving module, configured to receive the service parameters configured for each selected basic component by the user in the service parameter configuration area;
and the generating module is used for generating and storing the service description configuration information based on the arrangement operation of the user in the service arrangement area and the service parameters configured by the user.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN202110907854.8A 2021-08-09 2021-08-09 Data processing method and device, electronic equipment and storage medium Pending CN113626102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110907854.8A CN113626102A (en) 2021-08-09 2021-08-09 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110907854.8A CN113626102A (en) 2021-08-09 2021-08-09 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113626102A true CN113626102A (en) 2021-11-09

Family

ID=78383676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110907854.8A Pending CN113626102A (en) 2021-08-09 2021-08-09 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113626102A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185575A (en) * 2021-12-13 2022-03-15 中国建设银行股份有限公司 Business system upgrading method and device
CN114416039A (en) * 2022-01-25 2022-04-29 中国农业银行股份有限公司 Data processing method, device and platform
CN114461208A (en) * 2022-01-06 2022-05-10 深圳安巽科技有限公司 Software automation arrangement method and system
CN114895972A (en) * 2022-04-02 2022-08-12 中国建设银行股份有限公司 Flow configuration method and device
CN114968621A (en) * 2022-05-10 2022-08-30 北京字节跳动网络技术有限公司 Data communication method, device, equipment, storage medium and system
WO2023246801A1 (en) * 2022-06-21 2023-12-28 阿里巴巴(中国)有限公司 Orchestration method and apparatus for algorithm pipeline, and electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101575A (en) * 2018-07-18 2018-12-28 广东惠禾科技发展有限公司 Calculation method and device
CN111078094A (en) * 2019-12-04 2020-04-28 北京邮电大学 Distributed Machine Learning Visualizer
CN111158884A (en) * 2019-12-31 2020-05-15 深圳云天励飞技术有限公司 A data analysis method, device, electronic device and storage medium
CN113110963A (en) * 2021-04-28 2021-07-13 北京京东拓先科技有限公司 Service processing method, service processing device, electronic equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101575A (en) * 2018-07-18 2018-12-28 广东惠禾科技发展有限公司 Calculation method and device
CN111078094A (en) * 2019-12-04 2020-04-28 北京邮电大学 Distributed Machine Learning Visualizer
CN111158884A (en) * 2019-12-31 2020-05-15 深圳云天励飞技术有限公司 A data analysis method, device, electronic device and storage medium
CN113110963A (en) * 2021-04-28 2021-07-13 北京京东拓先科技有限公司 Service processing method, service processing device, electronic equipment and readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185575A (en) * 2021-12-13 2022-03-15 中国建设银行股份有限公司 Business system upgrading method and device
CN114461208A (en) * 2022-01-06 2022-05-10 深圳安巽科技有限公司 Software automation arrangement method and system
CN114416039A (en) * 2022-01-25 2022-04-29 中国农业银行股份有限公司 Data processing method, device and platform
CN114895972A (en) * 2022-04-02 2022-08-12 中国建设银行股份有限公司 Flow configuration method and device
CN114968621A (en) * 2022-05-10 2022-08-30 北京字节跳动网络技术有限公司 Data communication method, device, equipment, storage medium and system
WO2023246801A1 (en) * 2022-06-21 2023-12-28 阿里巴巴(中国)有限公司 Orchestration method and apparatus for algorithm pipeline, and electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN113626102A (en) Data processing method and device, electronic equipment and storage medium
US12153512B2 (en) System and method for automated intelligent mobile application testing
US20240037020A1 (en) System and Method for Automated Software Testing
US10565095B2 (en) Hybrid testing automation engine
US9268672B1 (en) Automated test case generation for applications
CN108304201B (en) Object updating method, device and equipment
CN109669873B (en) User interface automatic testing method and device, electronic device and storage medium
US10606450B2 (en) Method and system for visual requirements and component reuse driven rapid application composition
US9280451B2 (en) Testing device
CN110532020A (en) A kind of data processing method of micro services layout, apparatus and system
JP2019520649A (en) Process visualization platform
CN111507676B (en) Method, device, storage medium and system for creating and realizing business order flow
CN102447743A (en) System and method for cloud enterprise services
US10908948B2 (en) Multiple application instances in operating systems that utilize a single process for application execution
CN112905441A (en) Test case generation method, test method, device and equipment
CN110187874B (en) Rule configuration method and device executed in computer equipment
CN115469833A (en) Method and device for implementing dynamic rule engine, electronic equipment and storage medium
CN113127099B (en) Server configuration method, device, equipment and storage medium
US11256501B2 (en) Federated extensibility workbench
CN109542775B (en) A method and device for generating and executing a test script
US20240220237A1 (en) Smart grouping of code packages
CN116049000A (en) Environmental parameter configuration method, device, equipment, storage medium and product
CN112068895B (en) Code configuration method, device, video playing equipment and storage medium
CN114356290A (en) A data processing method, apparatus and computer readable storage medium
CN110888649B (en) Application deployment method, application baseline creation method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211109