A parsing method and system based on application scenario graph

By analyzing the application scenario diagram corresponding to the user's business needs and generating an API call list, the problem of low application development efficiency caused by the huge API list in the existing technology is solved, and more efficient API usage and application development are achieved.

CN113391810BActive Publication Date: 2025-03-07LYNXI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010167804.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-11
Publication Date
2025-03-07
Estimated Expiration
2040-03-11

AI Technical Summary

Technical Problem

The list of APIs for existing chip and board products is too large, which makes it more difficult for users to use these APIs and is less efficient in application development.

Method used

By obtaining the application scenario map corresponding to the user's business needs, parsing the scenario corresponding to the application scenario map, obtaining the API call list required for the user's application scenario, using SDK mapping rules to filter out the corresponding API from the API library, and generating an API call list.

Benefits of technology

It greatly shortens the time for users to use APIs for application development, makes users more purposeful when reading and understanding APIs, and improves the efficiency of application development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113391810B_ABST
    Figure CN113391810B_ABST
Patent Text Reader

Abstract

The present invention discloses a parsing method and system based on an application scenario graph, comprising: obtaining an application scenario graph corresponding to a business requirement; based on a mapping rule provided by an SDK, filtering out an API corresponding to each operation node in the application scenario graph from an API library, and obtaining an API mapping list of the application scenario graph; based on the API mapping list, determining an API call list of the application scenario graph. The beneficial effects of the present invention are: according to the application scenario graph corresponding to the user's business requirement, parsing the scenario corresponding to the application scenario graph, obtaining an API call list required by the user's application scenario, thereby improving the efficiency of application development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip development technology, and in particular to an analysis method and system based on an application scenario graph. Background Art

[0002] Currently, all chips, board products or hardware solutions are equipped with a software development kit (SDK) and a list of application programming interfaces (APIs) corresponding to the SDK. As solutions continue to improve, the list of APIs provided to users is getting larger and larger, making it increasingly difficult for users to use these APIs. Moreover, each API only performs a fixed single function, and users need to find the corresponding APIs themselves to combine into their own applications, which results in low application development efficiency. Summary of the invention

[0003] To solve the above problems, the purpose of the present invention is to provide a parsing method and system based on application scenario graph, which can parse the scenario corresponding to the application scenario graph according to the application scenario graph converted according to user needs, obtain the API call list required for the user's application scenario, and improve the efficiency of application development.

[0004] The present invention provides a parsing method based on an application scenario graph, comprising:

[0005] Obtain the application scenario diagram corresponding to the business requirements;

[0006] Based on the SDK mapping rules, filter out the API corresponding to each operation node in the application scenario graph from the API library to obtain an API mapping list of the application scenario graph;

[0007] Based on the API mapping list, an API call list of the application scenario graph is determined.

[0008] As a further improvement of the present invention, the method further includes: obtaining the business requirements through one or more of a graphical interface configuration wizard, a UI interactive interface, a command line mode, a text format file, and a table file.

[0009] As a further improvement of the present invention, the application scenario diagram is a structured document that describes the logical relationship and configuration of each operation node in the business requirement.

[0010] As a further improvement of the present invention, the method further includes: performing combined optimization on multiple APIs in the API call list to obtain an API call list after the application scenario graph is optimized.

[0011] As a further improvement of the present invention, multiple APIs in the API call list are combined and optimized to obtain the API call list after the application scenario graph is optimized, including: combining the APIs corresponding to multiple operation nodes that comply with the chip optimization strategy into one API, and based on the combined API, obtaining the API call list after the application scenario graph is optimized.

[0012] As a further improvement of the present invention, the APIs corresponding to multiple operation nodes that meet the chip optimization strategy are combined into one API, including:

[0013] If the calling sequence of the multiple operation nodes conforms to the chip optimization strategy, combining the APIs corresponding to the multiple operation nodes into one API;

[0014] If the new calling order of the multiple operation nodes meets the chip optimization strategy after some of the multiple operation nodes exchange their calling orders, the APIs corresponding to the new calling order of the multiple operation nodes are combined into one API.

[0015] As a further improvement of the present invention, when the application scenario graph contains multiple network scenarios, the analysis method also includes: serially combining multiple network models that satisfy the serial combination relationship in the application scenario graph, and generating a corresponding network model relationship configuration file based on the serially combined network models.

[0016] As a further improvement of the present invention, multiple network models satisfying the serial combination relationship in the application scenario graph are serially combined, including:

[0017] If the output of the first-level network model enters the second-level network model, the first-level network model and the second-level network model are connected in series to form a network;

[0018] If the output of the first-level network model enters the second-level network model a and the second-level network model b, the first-level network model, the second-level network model a and the second-level network model b are connected in series to form one network.

[0019] As a further improvement of the present invention, the SDK mapping rules are obtained based on the SDK abstraction of the chip or board, and each chip or board corresponds to a set of SDK mapping rules.

[0020] The present invention also provides a parsing system based on an application scenario graph, using the method described, the system comprising:

[0021] An application scenario graph generation module, which is used to obtain an application scenario graph corresponding to business requirements;

[0022] An API mapping list generation module is used to filter out the API corresponding to each operation node in the application scenario graph from the API library based on the SDK mapping rules, and obtain the API mapping list of the application scenario graph;

[0023] An API call list generation module is used to determine the API call list of the application scenario graph based on the API mapping list.

[0024] As a further improvement of the present invention, the business requirements are obtained through one or more of a graphical interface configuration wizard, a UI interactive interface, a command line mode, a text format file, and a table file.

[0025] As a further improvement of the present invention, the application scenario diagram is a structured document that describes the logical relationship and configuration of each operation node in the business requirement.

[0026] As a further improvement of the present invention, the system further comprises:

[0027] The API combination optimization module is used to perform combination optimization on multiple APIs in the API call list to obtain the API call list after the application scenario graph is optimized.

[0028] As a further improvement of the present invention, the API combination optimization module performs combination optimization on multiple APIs in the API call list to obtain the API call list after the application scenario graph is optimized, including: combining the APIs corresponding to multiple operation nodes that comply with the chip optimization strategy into one API, and based on the combined API, obtaining the API call list after the application scenario graph is optimized.

[0029] As a further improvement of the present invention, the API combination optimization module combines the APIs corresponding to multiple operation nodes that meet the chip optimization strategy into one API, including:

[0030] If the calling sequence of the multiple operation nodes conforms to the chip optimization strategy, combining the APIs corresponding to the multiple operation nodes into one API;

[0031] If the new calling order of the multiple operation nodes meets the chip optimization strategy after some of the multiple operation nodes exchange their calling orders, the APIs corresponding to the new calling order of the multiple operation nodes are combined into one API.

[0032] As a further improvement of the present invention, when the application scenario graph includes multiple network scenarios, the parsing system further includes:

[0033] A multi-network model concatenation module is used to concatenate and combine multiple network models that satisfy the concatenation combination relationship in the application scenario diagram, and generate a corresponding network model relationship configuration file based on the concatenated network models.

[0034] As a further improvement of the present invention, the multi-network model concatenation module concatenates and combines multiple network models that satisfy the concatenation combination relationship in the application scenario graph, including:

[0035] If the output of the first-level network model enters the second-level network model, the first-level network model and the second-level network model are connected in series to form a network;

[0036] If the output of the first-level network model enters the second-level network model a and the second-level network model b, the first-level network model, the second-level network model a and the second-level network model b are connected in series to form one network.

[0037] As a further improvement of the present invention, the SDK mapping rules are obtained based on the SDK abstraction of the chip or board, and each chip or board corresponds to a set of SDK mapping rules.

[0038] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the described method.

[0039] The present invention also provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the method.

[0040] The beneficial effects of the present invention are:

[0041] According to the application scenario graph corresponding to the user's business needs, the scenario corresponding to the application scenario graph is parsed to obtain the API call list required for the user's application scenario, which greatly shortens the time for users to develop applications using APIs and makes users more purposeful when reading and understanding APIs. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.

[0043] Figure 1 A schematic diagram of a flow chart of a parsing method based on an application scenario graph according to an exemplary embodiment of the present disclosure;

[0044] Figure 2 The present invention is a schematic diagram of a parsing method based on an application scenario graph according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0046] It should be noted that if the embodiments of the present disclosure involve directional indications (such as up, down, left, right, front, back, etc.), such directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0047] In addition, in the description of the present disclosure, the terms used are only for illustrative purposes and are not intended to limit the scope of the present disclosure. The terms "include" and / or "comprise" are used to specify the existence of the elements, steps, operations and / or components, but do not exclude the existence or addition of one or more other elements, steps, operations and / or components. The terms "first", "second" and the like may be used to describe various elements, do not represent the order, and do not limit these elements. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "multiple" is two and more than two. These terms are only used to distinguish one element from another element. In conjunction with the following drawings, these and / or other aspects become apparent, and it is easier for those of ordinary skill in the art to understand the description of the embodiments described in the present disclosure. The accompanying drawings are used to describe the embodiments described in the present disclosure for illustrative purposes only. Those skilled in the art will easily recognize from the following description that, without departing from the principles described in the present disclosure, alternative embodiments of the structures and methods shown in the present disclosure can be adopted.

[0048] A parsing method based on an application scenario graph in an embodiment of the present disclosure, such as Figure 1 and 2 As shown, including:

[0049] Get the application scenario diagram corresponding to the business requirements.

[0050] This step is to obtain the application scenario graph corresponding to the business requirements defined by the user. The application scenario graph is a structured file that describes the logical relationship and configuration of each operation node in the business requirements. The operation node is the operation performed on the data. In the description process, you can clearly describe what needs to be done in each step according to the operation node (for example, each operation node can be defined as: video decoding, image preprocessing, reasoning, image encoding), etc. The format of the application scenario graph can be YAML, JSON, etc. For example, the application scenario graph can choose a YAML format file, because YAML has high readability and is very close to the data structure of the programming language, and has rich expression capabilities and extensibility.

[0051] In an optional implementation, the business requirements are obtained through one or more of a graphical interface configuration wizard, a UI interactive interface, a command line method, a text format file, and a table file.

[0052] For example, a graphical interface configuration wizard may be provided, wherein the graphical interface includes options, each of which is related to a business requirement, and a user may define his or her business requirement by dragging buttons in the graphical interface, selecting various options, and the like. In another optional implementation, business requirements may also be defined by a command line, a text format file, or a table file. For example, a user may describe business requirements by using an Excel file or a text file, and a terminal or server may obtain a text format file to obtain business requirements. Based on the obtained business requirements, an application scenario diagram corresponding to the business requirements may be determined.

[0053] Based on the SDK mapping rules, the API corresponding to each operation node in the application scenario graph is filtered out from the API library to obtain the API mapping list of the application scenario graph.

[0054] This step is to analyze the application scenario graph. According to what each operation node described in the application scenario graph needs to do, it can accurately match the user's business needs and select the appropriate matching API from the API library. By analyzing the application scenario graph, the time for users to use APIs for application development is greatly shortened, making users more purposeful when reading and understanding APIs. When the user's application scenario graph is detailed enough, the API of the application scenario can be directly mapped, eliminating the user's programming and development steps and improving the efficiency of application development.

[0055] The parsing method disclosed in the present disclosure is based on SDK mapping rules, which are obtained through SDK abstraction of chips or boards. The SDK mapping rules define a series of information such as keywords and operation node attributes used in the application scenario graph parsing process, and a set of SDK mapping rules corresponds to each chip or board. For different chips or boards, you only need to modify or define the abstract rules for the chip or board to adapt the SDK mapping rules.

[0056] Based on the API mapping list, determine the API call list of the application scenario graph.

[0057] The API mapping list is a collection of APIs corresponding to each operation node, that is, the support list of each operation node. This step is based on the user's business needs to obtain the logical relationship between each operation node. According to the logical relationship between each operation node, the calling order of the API corresponding to each operation node can be determined.

[0058] The method disclosed in the present invention parses the scenario corresponding to the application scenario diagram according to the application scenario diagram converted according to the user's business needs, and obtains the API call list required for the user's application scenario, which greatly shortens the time for users to develop applications using APIs and makes users more purposeful when reading and understanding APIs.

[0059] In an optional embodiment, the method further includes: combining and optimizing multiple APIs in the API call list to obtain an API call list optimized for the application scenario graph. In an optional embodiment, combining and optimizing multiple APIs in the API call list to obtain an API call list optimized for the application scenario graph includes: combining the APIs corresponding to multiple operation nodes that comply with the chip optimization strategy into one API. According to the multiple operation nodes involved in the application scenario graph that comply with the chip internal hardware optimization execution strategy, and based on the combined API, the API call list optimized for the application scenario graph is obtained. Fine-grained API combinations are performed on the parsed APIs according to their functions, and multiple APIs are synthesized into one API, which can achieve many-to-one optimization of the APIs, improve the execution efficiency of the hardware, and reduce the resource consumption of the memory or CPU while meeting the user's business needs. Complying with the chip optimization strategy can be understood as improving the execution efficiency of the hardware, reducing the overhead of system interaction, and reducing the resource consumption of the memory or CPU.

[0060] In an optional implementation, APIs corresponding to multiple operation nodes that comply with the chip optimization strategy are combined into one API, including:

[0061] If the calling sequence of multiple operation nodes meets the chip optimization strategy, the APIs corresponding to the multiple operation nodes are combined into one API. For example, in the image preprocessing stage, the user needs to perform four preprocessing operations A, B, C, and D in sequence. If the order of calling A, B, C, and D meets the chip optimization strategy, the APIs corresponding to the four preprocessing operations A, B, C, and D are combined into one API.

[0062] If the new calling order of multiple operation nodes meets the chip optimization strategy after some of the operation nodes are swapped, the APIs corresponding to the new calling order of the multiple operation nodes are combined into one API. For example, in the image preprocessing stage, the user needs to perform four preprocessing operations A, B, C, and D in sequence. If swapping operations B and C does not affect the preprocessing results, and the new calling order A, C, B, and D after the swap meets the chip optimization strategy, the APIs corresponding to the four preprocessing operations A, C, B, and D are combined into one API.

[0063] In an optional embodiment, if Figure 2 As shown, when the application scenario graph contains multiple network scenarios, the relationship between each neural network is specified in the application scenario graph. The method also includes: combining in series multiple network models that satisfy the serial combination relationship in the application scenario graph, and generating a corresponding network model relationship configuration file based on the serially combined network models.

[0064] When users call the API to perform neural network mapping, especially mapping of multiple network scenarios, each network can only be scheduled according to the API, and the optimization between networks cannot be solved, resulting in a significant reduction in operating efficiency. The method described in this disclosure connects and combines multiple networks in the application scenario graph in series, specifies the relationship between models for the work of the neural network compiler, and facilitates the compiler to perform mapping optimization in multi-network application scenarios while meeting the user's business needs. During the compilation stage, the compiler will treat multiple networks as the same network for combined compilation, and then optimize the internal network hierarchy or operators, saving calculation steps and improving compilation efficiency.

[0065] In an optional implementation, multiple network models satisfying the serial combination relationship in the application scenario graph are serially combined, including:

[0066] If the output of the first-level network model enters the second-level network model, the first-level network model and the second-level network model are connected in series to form a network. For example, if the output of network model A enters network model B, network model A and network model B are considered as one network.

[0067] If the output of the first-level network model enters the second-level network model a and the second-level network model b, the first-level network model, the second-level network model a and the second-level network model b are connected in series to form a network. For example, the output of network model A enters network model B and network model C (that is, network model B and network model C are in parallel), then network model A, network model B and network model C are regarded as one network.

[0068] An analysis system based on an application scenario graph according to an embodiment of the present disclosure adopts the method described above, and the system includes:

[0069] The application scenario graph generation module is used to obtain the application scenario graph corresponding to the business requirements.

[0070] This module is used to obtain the application scenario diagram corresponding to the business requirements defined by the user. The application scenario diagram is a structured file that describes the logical relationship and configuration of each operation node in the business requirements. The operation node is the operation performed on the data. In the description process, it is necessary to clearly describe what needs to be done in each step according to the operation node (for example, each operation node can be defined as: video decoding, image preprocessing, reasoning, image encoding), etc. The format of the application scenario diagram can be YAML, JSON, etc. For example, the application scenario diagram can choose a YAML format file, because YAML has high readability and is very close to the data structure of the programming language, and it also has rich expression capabilities and extensibility.

[0071] In an optional implementation, the business requirements are obtained through one or more of a graphical interface configuration wizard, a UI interactive interface, a command line method, a text format file, and a table file.

[0072] For example, a graphical interface configuration wizard may be provided, wherein the graphical interface includes options, each of which is related to a business requirement, and a user may define his or her business requirement by dragging buttons in the graphical interface, selecting various options, and the like. In another optional implementation, business requirements may also be defined by a command line, a text format file, or a table file. For example, a user may describe business requirements by using an Excel file or a text file, and a terminal or server may obtain a text format file to obtain business requirements. Based on the obtained business requirements, an application scenario diagram corresponding to the business requirements may be determined.

[0073] The API mapping generation module is used to filter out the API corresponding to each operation node in the application scenario graph from the API library based on the SDK mapping rules, and obtain the API mapping list of the application scenario graph.

[0074] This module is an analysis of the application scenario graph. According to what each operation node described in the application scenario graph needs to do, it can accurately match the user's business needs and select the appropriate matching API from the API library. By analyzing the application scenario graph, the time for users to use APIs for application development is greatly shortened, making users more purposeful when reading and understanding APIs. When the user's application scenario graph is detailed enough, the API of the application scenario can be directly mapped out, eliminating the user's programming and development steps and improving the efficiency of application development.

[0075] The parsing system disclosed in the present disclosure is based on SDK mapping rules, which are obtained through SDK abstraction of chips or boards. The SDK mapping rules define a series of information such as keywords and operation node attributes used in the application scenario graph parsing process, and a set of SDK mapping rules corresponds to each chip or board. For different chips or boards, you only need to modify or define the abstract rules for the chip or board to adapt the SDK mapping rules.

[0076] The API call list generation module is used to determine the API call list of the application scenario graph based on the API mapping list.

[0077] The API mapping list is a collection of APIs corresponding to each operation node, that is, the support list of each operation node. The API call list generation module can obtain the logical relationship between each operation node based on the user's business needs, and based on the logical relationship between each operation node, it can further determine the calling order of the API corresponding to each operation node.

[0078] The system disclosed in the present invention parses the scenario corresponding to the application scenario graph according to the converted application scenario graph corresponding to the user's business needs, and obtains the API call list required for the user's application scenario, which greatly shortens the time for users to develop applications using APIs and makes users more purposeful when reading and understanding APIs.

[0079] In an optional embodiment, the system further includes:

[0080] The API combination optimization module is used to combine and optimize multiple APIs in the API call list to obtain an API call list after the application scenario graph is optimized.

[0081] In an optional implementation, the API combination optimization module performs combination optimization on multiple APIs in the API call list, including: combining the APIs corresponding to multiple operation nodes that comply with the chip optimization strategy into one API. According to the multiple operation nodes involved in the application scenario graph that comply with the chip's internal hardware optimization execution strategy, and based on the combined API, an API call list optimized for the application scenario graph is obtained. Fine-grained API combinations are performed on the parsed APIs according to their functions, and multiple APIs are synthesized into one API, which can achieve many-to-one optimization of the APIs, improve the execution efficiency of the hardware, and reduce the consumption of memory or CPU resources while meeting the user's business needs.

[0082] In an optional implementation, the API combination optimization module combines APIs corresponding to multiple operation nodes that meet the chip optimization strategy into one API, including:

[0083] If the calling sequence of multiple operation nodes meets the chip optimization strategy, the APIs corresponding to the multiple operation nodes are combined into one API. For example, in the image preprocessing stage, the user needs to perform four preprocessing operations A, B, C, and D in sequence. If the order of calling A, B, C, and D meets the chip optimization strategy, the APIs corresponding to the four preprocessing operations A, B, C, and D are combined into one API.

[0084] If the new calling order of multiple operation nodes meets the chip optimization strategy after some of the operation nodes are swapped, the APIs corresponding to the new calling order of the multiple operation nodes are combined into one API. For example, in the image preprocessing stage, the user needs to perform four preprocessing operations A, B, C, and D in sequence. If swapping operations B and C does not affect the preprocessing results, and the new calling order A, C, B, and D after the swap meets the chip optimization strategy, then the APIs corresponding to the four preprocessing operations A, C, B, and D are combined into one API.

[0085] In an optional implementation, when the application scenario graph includes multiple network scenarios, the relationship between the neural networks is indicated in the application scenario graph, and the system further includes:

[0086] A multi-network model concatenation module is used to concatenate and combine multiple network models that satisfy the concatenation combination relationship in the application scenario diagram, and generate a corresponding network model relationship configuration file based on the concatenated network models.

[0087] When users call the API to perform neural network mapping, especially mapping of multiple network scenarios, each network can only be scheduled according to the API, and the optimization between networks cannot be solved, resulting in a significant reduction in operating efficiency. The system described in the present disclosure connects and combines multiple networks in the application scenario graph in series, specifies the relationship between models for the work of the neural network compiler, and facilitates the compiler to perform mapping optimization in multi-network application scenarios while meeting user needs. During the compilation stage, the compiler will treat multiple networks as the same network for combined compilation, and then optimize the internal network hierarchy or operators to save calculation steps.

[0088] In an optional implementation, the multi-network model concatenation module concatenates and combines multiple network models that satisfy the concatenation combination relationship in the application scenario graph, including:

[0089] If the output of the first-level network model enters the second-level network model, the first-level network model and the second-level network model are connected in series to form a network. For example, if the output of network model A enters network model B, network model A and network model B are considered as one network.

[0090] If the output of the first-level network model enters the second-level network model a and the second-level network model b, the first-level network model, the second-level network model a and the second-level network model b are connected in series to form a network. For example, the output of network model A enters network model B and network model C (that is, network model B and network model C are in parallel), then network model A, network model B and network model C are regarded as one network.

[0091] The present disclosure also relates to an electronic device, including a server, a terminal, etc. The electronic device includes: at least one processor; a memory connected to the at least one processor; and a communication component connected to the storage medium, wherein the communication component receives and sends data under the control of the processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the parsing method based on the application scenario graph in the above embodiment.

[0092] In an optional implementation, the memory is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The processor executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in the memory, that is, implementing the above-mentioned analysis method based on the application scenario graph.

[0093] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store a list of options, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to an external device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0094] One or more modules are stored in the memory, and when executed by one or more processors, perform the analysis method based on the application scenario graph in any of the above method embodiments.

[0095] The above-mentioned product can execute the analysis method based on the application scenario graph provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the analysis method based on the application scenario graph provided in the embodiment of the present application.

[0096] The present disclosure also relates to a computer-readable storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above-mentioned embodiments of the parsing method based on the application scenario graph.

[0097] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0098] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present disclosure can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0099] In addition, it will be understood by those skilled in the art that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present disclosure and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0100] It will be appreciated by those skilled in the art that, although the present disclosure has been described with reference to exemplary embodiments, various changes may be made and elements thereof may be replaced with equivalents without departing from the scope of the present disclosure. In addition, many modifications may be made to adapt specific circumstances or materials to the teachings of the present disclosure without departing from the substantive scope of the present disclosure. Therefore, the present disclosure is not limited to the specific embodiments disclosed, but the present disclosure will include all embodiments falling within the scope of the appended claims.

Claims

1. A parsing method based on an application scenario graph, characterized in that: include: Obtain the application scenario diagram corresponding to the business requirements; Based on the SDK mapping rule, an API corresponding to each operation node in the application scenario graph is screened out from the API library to obtain an API mapping list of the application scenario graph, wherein the SDK mapping rule is obtained through SDK abstraction of a chip or board, the application scenario graph is a structured file describing the logical relationship and configuration of each operation node in the business requirements, the operation node is used to indicate at least one of video decoding, image preprocessing, reasoning, and image encoding operations, and the API mapping list is a support list for characterizing the operation node; Based on the API mapping list, determine the API call list of the application scenario graph; When the application scenario graph includes multiple network scenarios, the method further includes: combining in series multiple network models that satisfy the serial combination relationship in the application scenario graph, and generating a corresponding network model relationship configuration file based on the serially combined network models.

2. The method according to claim 1, characterized in that The method further comprises: The business requirements are obtained through one or more of a graphical interface configuration wizard, a UI interactive interface, a command line mode, a text format file, and a table file.

3. The method according to claim 1, characterized in that The application scenario diagram is a structured document that describes the logical relationship and configuration of each operation node in the business requirement.

4. The method according to claim 1, characterized in that: The method further includes: performing combined optimization on multiple APIs in the API call list to obtain an API call list after the application scenario graph is optimized.

5. The method according to claim 4, characterized in that Combining and optimizing the multiple APIs in the API call list to obtain the optimized API call list of the application scenario graph includes: combining the APIs corresponding to the multiple operation nodes that meet the chip optimization strategy into one API, and obtaining the optimized API call list of the application scenario graph based on the combined API.

6. The method according to claim 5, characterized in that Combine the APIs corresponding to multiple operation nodes that meet the chip optimization strategy into one API, including: If the calling sequence of the multiple operation nodes conforms to the chip optimization strategy, combining the APIs corresponding to the multiple operation nodes into one API; If the new calling order of the multiple operation nodes meets the chip optimization strategy after some of the multiple operation nodes exchange their calling orders, the APIs corresponding to the new calling order of the multiple operation nodes are combined into one API.

7. The method according to claim 1, characterized in that The multiple network models satisfying the serial combination relationship in the application scenario diagram are serially combined, including: If the output of the first-level network model enters the second-level network model, the first-level network model and the second-level network model are connected in series to form a network; If the output of the first-level network model enters the second-level network model a and the second-level network model b, the first-level network model, the second-level network model a and the second-level network model b are connected in series to form one network.

8. The method according to claim 1, characterized in that The SDK mapping rules are obtained based on the SDK abstraction of the chip or board, and each chip or board corresponds to a set of SDK mapping rules.

9. A parsing system based on an application scenario graph, characterized in that: According to any one of claims 1 to 8, the system comprises: An application scenario graph generation module, which is used to obtain an application scenario graph corresponding to business requirements; An API mapping list generation module, which is used to filter out the API corresponding to each operation node in the application scenario graph from the API library based on the SDK mapping rule, and obtain the API mapping list of the application scenario graph, wherein the SDK mapping rule is obtained by SDK abstraction of the chip or board, the application scenario graph is a structured file describing the logical relationship and configuration of each operation node in the business requirements, the operation node is used to indicate at least one of video decoding, image preprocessing, reasoning, and image encoding operations, and the API mapping list is a support list for characterizing the operation node; An API call list generation module, which is used to determine the API call list of the application scenario graph based on the API mapping list; When the application scenario graph includes multiple network scenarios, the parsing system further includes: A multi-network model concatenation module is used to concatenate and combine multiple network models that satisfy the concatenation combination relationship in the application scenario diagram, and generate a corresponding network model relationship configuration file based on the concatenated network models.

10. The system according to claim 9, characterized in that The business requirements are obtained through one or more of a graphical interface configuration wizard, a UI interactive interface, a command line mode, a text format file, and a table file.

11. The system according to claim 9, characterized in that The application scenario diagram is a structured document that describes the logical relationship and configuration of each operation node in the business requirement.

12. The system according to claim 9, characterized in that The system further comprises: The API combination optimization module is used to perform combination optimization on multiple APIs in the API call list to obtain the API call list after the application scenario graph is optimized.

13. The system according to claim 12, characterized in that The API combination optimization module performs combination optimization on multiple APIs in the API call list to obtain the API call list after the application scenario graph is optimized, including: combining the APIs corresponding to multiple operation nodes that comply with the chip optimization strategy into one API, and based on the combined API, obtaining the API call list after the application scenario graph is optimized.

14. The system according to claim 13, characterized in that The API combination optimization module combines the APIs corresponding to multiple operation nodes that meet the chip optimization strategy into one API, including: If the calling sequence of the multiple operation nodes conforms to the chip optimization strategy, combining the APIs corresponding to the multiple operation nodes into one API; If the new calling order of the multiple operation nodes meets the chip optimization strategy after some of the multiple operation nodes exchange their calling orders, the APIs corresponding to the new calling order of the multiple operation nodes are combined into one API.

15. The system according to claim 9, characterized in that The multi-network model serial connection module serially connects and combines multiple network models that satisfy the serial connection combination relationship in the application scenario diagram, including: If the output of the first-level network model enters the second-level network model, the first-level network model and the second-level network model are connected in series to form a network; If the output of the first-level network model enters the second-level network model a and the second-level network model b, the first-level network model, the second-level network model a and the second-level network model b are connected in series to form one network.

16. The system according to claim 9, characterized in that The SDK mapping rules are obtained based on the SDK abstraction of the chip or board, and each chip or board corresponds to a set of SDK mapping rules.

17. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method according to any one of claims 1 to 8.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Telecommunication service generation environmental system

    CN101299862A

  • Method and device for achieving optical transport network (OTN) series chip software kit framework

    CN103559028A

  • Service implementation system and method

    CN107846435A

  • Method, device, equipment and system for constructing figure image recognition system

    CN110472516A