[go: up one dir, main page]

CN113391810B - A parsing method and system based on application scenario graph - Google Patents

A parsing method and system based on application scenario graph Download PDF

Info

Publication number
CN113391810B
CN113391810B CN202010167804.6A CN202010167804A CN113391810B CN 113391810 B CN113391810 B CN 113391810B CN 202010167804 A CN202010167804 A CN 202010167804A CN 113391810 B CN113391810 B CN 113391810B
Authority
CN
China
Prior art keywords
api
network model
application scene
scene graph
apis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010167804.6A
Other languages
Chinese (zh)
Other versions
CN113391810A (en
Inventor
吴建伟
马欣
金罗军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Lynxi Technology Co Ltd
Original Assignee
Beijing Lynxi 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 Lynxi Technology Co Ltd filed Critical Beijing Lynxi Technology Co Ltd
Priority to CN202010167804.6A priority Critical patent/CN113391810B/en
Publication of CN113391810A publication Critical patent/CN113391810A/en
Application granted granted Critical
Publication of CN113391810B publication Critical patent/CN113391810B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • 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/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an analysis method and system based on an application scene graph, wherein the analysis method comprises the steps of obtaining the application scene graph corresponding to service requirements, screening APIs corresponding to each operation node in the application scene graph from an API library based on mapping rules provided by an SDK to obtain an API mapping list of the application scene graph, and determining an API call list of the application scene graph based on the API mapping list. The method has the beneficial effects that the scene corresponding to the application scene graph is analyzed according to the application scene graph corresponding to the user service requirement, and the API call list required by the user application scene is obtained, so that the application development efficiency is improved.

Description

Analysis method and system based on application scene graph
Technical Field
The invention relates to the technical field of chip development, in particular to an analysis method and system based on an application scene graph.
Background
All current chip, board products or hardware solutions are provided with a software development kit (Software Development Kit, SDK) and a list of application programming interfaces (Application Program Interface, API) corresponding to the SDK. With the continuous perfection of solutions, the API list provided to the user is becoming larger and larger, resulting in greater difficulty for the user to use these APIs. And each API is used for completing a fixed single function, a user needs to search the corresponding APIs to be combined into an application program, and the application development efficiency is low.
Disclosure of Invention
In order to solve the problems, the invention aims to provide an analysis method and an analysis system based on an application scene graph, which are converted according to user requirements, so as to analyze a scene corresponding to the application scene graph, obtain an API call list required by the user application scene and improve the efficiency of application development.
The invention provides an analysis method based on an application scene graph, which comprises the following steps:
acquiring an application scene graph corresponding to service requirements;
Based on SDK mapping rules, screening APIs corresponding to each operation node in the application scene graph from an API library to obtain an API mapping list of the application scene graph;
and determining an API call list of the application scene graph based on the API mapping list.
As a further improvement of the invention, the method further comprises acquiring the service requirement through one or more of a graphical interface configuration wizard, a UI interaction interface, a command line mode, a text format file and a form file.
As a further improvement of the invention, the application scene graph is a structured file describing the logical relationship and configuration of each operation node in the service demand.
The method further comprises the step of carrying out combined optimization on a plurality of APIs in the API call list to obtain an API call list after the application scene graph optimization.
The method comprises the steps of combining APIs corresponding to a plurality of operation nodes conforming to a chip optimization strategy into one API, and obtaining the API call list after optimizing the application scene graph based on the combined APIs.
As a further improvement of the present invention, combining APIs corresponding to a plurality of operation nodes conforming to a chip optimization policy into one API includes:
If the calling sequence of the plurality of operation nodes accords with the chip optimization strategy, combining the APIs corresponding to the plurality of operation nodes into one API;
And if the calling sequences of part of the operation nodes are mutually exchanged, the new calling sequences of the operation nodes accord with a chip optimization strategy, and the APIs corresponding to the new calling sequences of the operation nodes are combined into one API.
When the application scene graph contains multiple network scenes, the analysis method further comprises the steps of carrying out series combination on a plurality of network models meeting the series combination relation in the application scene graph, and generating a corresponding network model relation configuration file based on the network models after the series combination.
As a further improvement of the invention, the plurality of network models meeting the series combination relation in the application scene graph are subjected to series combination, and the method comprises the following steps:
If the output of the first-stage network model enters the second-stage network model, the first-stage network model and the second-stage network model are connected in series and combined into a network;
and if the output of the first-stage network model enters the second-stage network model a and the second-stage network model b, the first-stage network model, the second-stage network model a and the second-stage network model b are combined into a network in series.
As a further improvement of the invention, the SDK mapping rules are obtained based on the SDK abstraction of the chip or the board card, and each chip or board card corresponds to one set of SDK mapping rules.
The invention also provides an analysis system based on the application scene graph, which comprises the following steps:
The application scene graph generation module is used for acquiring an application scene graph corresponding to the service requirement;
the API mapping list generation module is used for screening APIs corresponding to each operation node in the application scene graph from an API library based on the SDK mapping rule to obtain an API mapping list of the application scene graph;
and the API call list generation module is used for determining an API call list of the application scene graph based on the API mapping list.
As a further improvement of the invention, the business requirement is obtained by one or more modes of graphical interface configuration guide, UI interaction interface, command line mode, text format file and form file.
As a further improvement of the invention, the application scene graph is a structured file describing the logical relationship and configuration of each operation node in the service demand.
As a further improvement of the invention, the system further comprises:
and the API combination optimization module is used for carrying out combination optimization on a plurality of APIs in the API call list to obtain the API call list after the application scene graph optimization.
As a further improvement of the invention, the API combination optimization module performs combination optimization on a plurality of APIs in the API call list to obtain an API call list after the optimization of the application scene graph, and the API combination optimization module comprises the steps of combining APIs corresponding to a plurality of operation nodes conforming to a chip optimization strategy into one API and obtaining the API call list after the optimization of the application scene graph based on the combined APIs.
As a further improvement of the present invention, the API combination optimization module combines APIs corresponding to a plurality of operation nodes conforming to a chip optimization policy into one API, including:
If the calling sequence of the plurality of operation nodes accords with the chip optimization strategy, combining the APIs corresponding to the plurality of operation nodes into one API;
And if the calling sequences of part of the operation nodes are mutually exchanged, the new calling sequences of the operation nodes accord with a chip optimization strategy, and the APIs corresponding to the new calling sequences of the operation nodes are combined into one API.
As a further improvement of the present invention, when the application scenario diagram includes a multi-network scenario, the parsing system further includes:
And the multi-network model serial connection module is used for carrying out serial connection combination on a plurality of network models meeting the serial connection combination relation in the application scene graph and generating a corresponding network model relation configuration file based on the network models after serial connection combination.
As a further improvement of the present invention, the multi-network model concatenation module concatenates a plurality of network models meeting a concatenation combination relationship in the application scenario diagram, including:
If the output of the first-stage network model enters the second-stage network model, the first-stage network model and the second-stage network model are connected in series and combined into a network;
and if the output of the first-stage network model enters the second-stage network model a and the second-stage network model b, the first-stage network model, the second-stage network model a and the second-stage network model b are combined into a network in series.
As a further improvement of the invention, the SDK mapping rules are obtained based on the SDK abstraction of the chip or the board card, and each chip or board card corresponds to one set of SDK mapping rules.
The invention also provides an electronic device comprising a memory for storing one or more computer instructions, and a processor, wherein the one or more computer instructions are executed by the processor to implement the method.
The invention also provides a computer readable storage medium having stored thereon a computer program for execution by a processor to perform the method.
The beneficial effects of the invention are as follows:
according to the application scene graph corresponding to the service requirement of the user, analyzing the scene corresponding to the application scene graph to obtain the API call list required by the application scene of the user, thereby greatly shortening the application development time of the user by using the API and enabling the user to have more purposefulness when reading and understanding the API.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the prior art, the drawings that are used in the description of the embodiments or the prior art will be briefly described below. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without inventive faculty.
Fig. 1 is a flowchart of an analysis method based on an application scenario diagram according to an exemplary embodiment of the present disclosure;
fig. 2 is a schematic diagram of an analysis method based on an application scene graph according to an exemplary embodiment of the disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It should be noted that, if directional indications (such as up, down, left, right, front, and rear are referred to in the embodiments of the present disclosure), the directional indications are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, in the description of the present disclosure, the terminology used is for the purpose of illustration only and is not intended to limit the scope of the present disclosure. The terms "comprises" and/or "comprising" are used to specify the presence of stated elements, steps, operations, and/or components, but do not preclude the presence or addition of one or more other elements, steps, operations, and/or components. The terms "first," "second," and the like may be used for describing various elements, do not represent a sequence, and are not intended to limit the elements. Furthermore, in the description of the present disclosure, unless otherwise indicated, the meaning of "a plurality" is two and more. These terms are only used to distinguish one element from another element. These and/or other aspects will become apparent to those of ordinary skill in the art from a review of the following drawings, and a description of the embodiments of the present disclosure will be more readily understood. The drawings are intended to depict the embodiments of the disclosure for purposes of illustration only. Those skilled in the art will readily recognize from the following description that alternative embodiments of the structures and methods illustrated in the present disclosure may be employed without departing from the principles of the present disclosure.
An analysis method based on an application scene graph in an embodiment of the disclosure, as shown in fig. 1 and 2, includes:
And acquiring an application scene graph corresponding to the service requirement.
The method comprises the steps of obtaining an application scene graph corresponding to a service requirement defined by a user, wherein the application scene graph is a structured file for describing the logic relation and configuration of each operation node in the service requirement, and the operation nodes operate on data. What each step needs to do (e.g., each operation node may be defined as video decoding, image preprocessing, reasoning, image encoding) may be clarified by the operation node description in the description process. The format of the application scene graph may be YAML, JSON, etc. For example, the application scene graph can select YAML format files, and the YAML format files are very close to a program language data structure due to high readability, and have rich expression capability and expansibility.
In an alternative embodiment, the business requirements are obtained by one or more of graphical interface configuration wizards, UI interaction interfaces, command line means, text format files and form files.
For example, a graphical interface configuration wizard may be provided wherein the graphical interface includes selectable items, each of which is associated with a business need, and the user may define his business need by way of a drag button of the graphical interface, selecting various selectable items, and so forth. In another alternative embodiment, the business requirements may also be defined by command line means, text format files or form files. For example, a user may describe a business requirement by an Excel file or a text file, and a terminal or server may obtain the text format file to obtain the business requirement. And determining an application scene graph corresponding to the service requirement according to the acquired service requirement.
And screening the APIs corresponding to each operation node in the application scene graph from the API library based on the SDK mapping rule to obtain an API mapping list of the application scene graph.
The step is to analyze the application scene graph, and according to what each operation node described in the application scene graph needs to do, the operation needs of the user can be accurately matched, and the API which is properly matched can be selected from the API library. By analyzing the application scene graph, the time of application development by a user by using the API is greatly shortened, and the user has more purposefulness when reading and understanding the API. When the application scene graph of the user is sufficiently detailed, the API of the application scene can be directly mapped, the steps of programming and developing of the user are omitted, and the efficiency of application development is improved.
The analysis method is based on SDK mapping rules, the SDK mapping rules are obtained through SDK abstraction of chips or boards, a series of information such as keywords and operation node attributes used in the analysis process of the application scene graph is defined in the SDK mapping rules, and one set of SDK mapping rules is corresponding to each chip or board. For different chips or boards, the adaptation of the SDK mapping rule can be performed only by modifying or defining the abstract rule of the chip or the board.
Based on the API mapping list, an API call list of the application scene graph is determined.
The API mapping list is a set of APIs corresponding to each operation node, namely a support list of each operation node, and the step is to acquire the logic relation of each operation node according to the service requirement of a user, and further determine the calling sequence of the APIs corresponding to each operation node according to the logic relation of each operation node.
According to the method, the scene corresponding to the application scene graph is analyzed according to the application scene graph converted corresponding to the service requirement of the user, so that an API call list required by the application scene of the user is obtained, the application development time of the user by using the API is greatly shortened, and the user has more purposefulness in reading and understanding the API.
In an optional implementation manner, the method further comprises the step of carrying out combined optimization on a plurality of APIs in the API call list to obtain an API call list after application scene graph optimization. In an alternative embodiment, the method for optimizing the combination of the multiple APIs in the API call list to obtain the API call list after optimizing the application scene graph comprises the step of combining the APIs corresponding to the multiple operation nodes conforming to the chip optimization strategy into one API. And obtaining an API call list after optimizing the application scene graph based on the combined APIs according to a plurality of operation nodes which are involved in the application scene graph and accord with the internal hardware optimization execution strategy of the chip. And combining the analyzed APIs with fine granularity according to functions, synthesizing a plurality of APIs into one API, optimizing the number of the APIs from one to many, improving the execution efficiency of hardware and reducing the resource consumption of a memory or a CPU on the premise of meeting the service requirements of users. The chip optimization strategy is understood to be that the execution efficiency of hardware is improved, the overhead of system interaction is reduced, the resource consumption of a memory or a CPU is reduced, and the like.
In an alternative embodiment, combining APIs corresponding to a plurality of operation nodes conforming to a chip optimization policy into one API includes:
And if the calling sequence of the plurality of operation nodes accords with the chip optimization strategy, combining the APIs corresponding to the plurality of operation nodes into one API. For example, in the image preprocessing link, the user needs to sequentially execute A, B, C, D four preprocessing operations, and if the sequence of sequentially calling A, B, C, D is exactly in line with the chip optimization policy, the APIs corresponding to the four preprocessing operations of A, B, C, D are combined into one API.
And if the calling sequences of part of the operation nodes are mutually exchanged, the new calling sequences of the operation nodes accord with the chip optimization strategy, and the APIs corresponding to the new calling sequences of the operation nodes are combined into one API. For example, in the image preprocessing link, the user needs to sequentially execute A, B, C, D four preprocessing operations, and if the B and C operations in the preprocessing operations are exchanged and do not affect the preprocessing result, and the new calling sequence A, C, B, D after the exchange accords with the chip optimization policy, the APIs corresponding to the A, C, B, D four preprocessing operations are combined into one API.
In an alternative embodiment, as shown in fig. 2, when the application scenario diagram includes multiple network scenarios, and the relationship between the neural networks is indicated in the application scenario diagram, the method further includes performing series combination on multiple network models in the application scenario diagram, where the multiple network models meet the series combination relationship, and generating a corresponding network model relationship configuration file based on the network models after the series combination.
When a user calls an API to map a neural network, particularly mapping of a multi-network scene, each network can only execute scheduling according to the API, and the problem that the optimization among networks cannot be solved, so that the operation efficiency is greatly reduced is solved. According to the method, multiple networks in the application scene graph are combined in series, the relation among models is indicated for the work of the neural network compiler, and the compiler is convenient to perform mapping optimization under the multi-network application scene on the premise that the service requirements of users are met. In the compiling stage, the compiler can take a plurality of networks as the same network to carry out combined compiling, so that internal network layers or operators are optimized, operation steps are saved, and compiling efficiency is improved.
In an alternative embodiment, the method for performing tandem combination on a plurality of network models meeting a tandem combination relationship in an application scene graph includes:
If the output of the first-stage network model enters the second-stage network model, the first-stage network model and the second-stage network model are connected in series and combined into a network. For example, the output of network model a enters network model B, and network model a and network model B are considered as one network.
If the output of the first-stage network model enters the second-stage network model a and the second-stage network model b, the first-stage network model, the second-stage network model a and the second-stage network model b are connected in series and combined into a network. For example, the output of network model a goes into network model B and network model C (i.e., network model B and network model C are in parallel), then network model a, network model B, and network model C are considered to be one network.
An application scene graph-based analysis system according to an embodiment of the present disclosure adopts the method, and the system includes:
and the application scene graph generation module is used for acquiring an application scene graph corresponding to the service requirement.
The module obtains an application scene graph corresponding to a service requirement defined by a user, wherein the application scene graph is a structured file for describing the logic relationship and configuration of each operation node in the service requirement, and the operation nodes operate on data. What needs to be done for each step (e.g., each operation node may be defined as video decoding, image preprocessing, reasoning, image encoding) needs to be clarified by the operation node description in the description process. The format of the application scene graph may be YAML, JSON, etc. For example, the application scene graph can select YAML format files, and the YAML format files are very close to a program language data structure due to high readability, and have rich expression capability and expansibility.
In an alternative embodiment, the business requirements are obtained by one or more of graphical interface configuration wizards, UI interaction interfaces, command line means, text format files and form files.
For example, a graphical interface configuration wizard may be provided wherein the graphical interface includes selectable items, each of which is associated with a business need, and the user may define his business need by way of a drag button of the graphical interface, selecting various selectable items, and so forth. In another alternative embodiment, the business requirements may also be defined by command line means, text format files or form files. For example, a user may describe a business requirement by an Excel file or a text file, and a terminal or server may obtain the text format file to obtain the business requirement. And determining an application scene graph corresponding to the service requirement according to the acquired service requirement.
And the API mapping generation module is used for screening the APIs corresponding to each operation node in the application scene graph from the API library based on the SDK mapping rule to obtain an API mapping list of the application scene graph.
The module is used for analyzing the application scene graph, and according to what each operation node described in the application scene graph needs to do, the module can be used for accurately matching the service requirement of a user, and the API which is properly matched can be selected from an API library. By analyzing the application scene graph, the time of application development by a user by using the API is greatly shortened, and the user has more purposefulness when reading and understanding the API. When the application scene graph of the user is sufficiently detailed, the API of the application scene can be directly mapped, the steps of programming and developing of the user are omitted, and the efficiency of application development is improved.
The analysis system is based on SDK mapping rules, the SDK mapping rules are obtained through SDK abstraction of chips or boards, a series of information such as keywords and operation node attributes used in the analysis process of the application scene graph is defined in the SDK mapping rules, and one set of SDK mapping rules is corresponding to each chip or board. For different chips or boards, the adaptation of the SDK mapping rule can be performed only by modifying or defining the abstract rule of the chip or the board.
And the API call list generation module is used for determining an API call list of the application scene graph based on the API mapping list.
The API mapping list is a set of APIs corresponding to each operation node, namely a support list of each operation node, the API calling list generating module can acquire the logic relation of each operation node according to the service requirement of a user, and the calling sequence of the APIs corresponding to each operation node can be further determined according to the logic relation of each operation node.
According to the system disclosed by the disclosure, the scene corresponding to the application scene graph is analyzed according to the application scene graph converted corresponding to the service requirement of the user, so that the API call list required by the application scene of the user is obtained, the application development time of the user by using the API is greatly shortened, and the user has more purposefulness in reading and understanding the API.
In an alternative embodiment, the system further comprises:
And the API combination optimization module is used for carrying out combination optimization on a plurality of APIs in the API call list to obtain an API call list after the application scene graph optimization.
In an alternative embodiment, the API combination optimization module performs combination optimization on multiple APIs in the API call list, and comprises combining APIs corresponding to multiple operation nodes conforming to the chip optimization strategy into one API. And obtaining an API call list after optimizing the application scene graph based on the combined APIs according to a plurality of operation nodes which are involved in the application scene graph and accord with the internal hardware optimization execution strategy of the chip. And combining the analyzed APIs with fine granularity according to functions, synthesizing a plurality of APIs into one API, optimizing the number of the APIs from one to many, improving the execution efficiency of hardware and reducing the resource consumption of a memory or a CPU on the premise of meeting the service requirements of users.
In an alternative embodiment, the API combination optimization module combines APIs corresponding to a plurality of operation nodes conforming to a chip optimization policy into one API, including:
And if the calling sequence of the plurality of operation nodes accords with the chip optimization strategy, combining the APIs corresponding to the plurality of operation nodes into one API. For example, in the image preprocessing link, the user needs to sequentially execute A, B, C, D four preprocessing operations, and if the sequence of sequentially calling A, B, C, D is exactly in line with the chip optimization policy, the APIs corresponding to the four preprocessing operations of A, B, C, D are combined into one API.
And if the calling sequences of part of the operation nodes are mutually exchanged, the new calling sequences of the operation nodes accord with the chip optimization strategy, and the APIs corresponding to the new calling sequences of the operation nodes are combined into one API. For example, in the image preprocessing link, the user needs to sequentially execute A, B, C, D four preprocessing operations, and if the B and C operations in the preprocessing operations are exchanged and do not affect the preprocessing result, and the new calling sequence A, C, B, D after the exchange accords with the chip optimization policy, the APIs corresponding to the A, C, B, D four preprocessing operations are combined into one API.
In an alternative embodiment, when the application scenario diagram includes a multi-network scenario, where the relationship between the respective neural networks is specified in the application scenario diagram, the system further includes:
And the multi-network model serial module is used for carrying out serial combination on a plurality of network models meeting serial combination relation in the application scene graph and generating a corresponding network model relation configuration file based on the network models after serial combination.
When a user calls an API to map a neural network, particularly mapping of a multi-network scene, each network can only execute scheduling according to the API, and the problem that the optimization among networks cannot be solved, so that the operation efficiency is greatly reduced is solved. The system disclosed by the disclosure combines a plurality of networks in the application scene graph in series, so that the relation among models is indicated for the work of the neural network compiler, and the compiler is convenient to perform mapping optimization under the multi-network application scene on the premise of meeting the user requirement. In the compiling stage, the compiler can take a plurality of networks as the same network to carry out combined compiling, so as to optimize internal network layers or operators and save operation steps.
In an alternative embodiment, the multi-network model concatenation module concatenates a plurality of network models in the application scenario diagram that satisfy a concatenation combination relationship, including:
If the output of the first-stage network model enters the second-stage network model, the first-stage network model and the second-stage network model are connected in series and combined into a network. For example, the output of network model a enters network model B, and network model a and network model B are considered as one network.
If the output of the first-stage network model enters the second-stage network model a and the second-stage network model b, the first-stage network model, the second-stage network model a and the second-stage network model b are connected in series and combined into a network. For example, the output of network model a goes into network model B and network model C (i.e., network model B and network model C are in parallel), then network model a, network model B, and network model C are considered to be one network.
The disclosure also relates to an electronic device, including a server, a terminal, and the like. The electronic device comprises at least one processor, a memory in communication connection with the at least one processor, and a communication component in communication connection with a storage medium, wherein the communication component receives and transmits data under the control of the processor, and the memory stores instructions executable by the at least one processor to implement the application scene graph-based parsing method in the embodiment.
In an alternative embodiment, the memory is implemented as a non-volatile computer-readable storage medium, and is 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 non-volatile software programs, instructions and modules stored in the memory, i.e. the above-mentioned analysis method based on the application scene graph is implemented.
The memory may include a memory program area that may store an operating system, an application program required for at least one function, a memory data area that may store a list of options, and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory optionally includes memory remotely located from the processor, the remote memory being connectable to the external device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in memory that, when executed by one or more processors, perform the application scenario graph-based parsing method of any of the method embodiments described above.
The product can execute the analysis method based on the application scene graph provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and technical details which are not described in detail in the embodiment can be seen in the analysis method based on the application scene graph provided by the embodiment of the application.
The present disclosure also relates to a computer-readable storage medium storing a computer-readable program for causing a computer to execute some or all of the embodiments of an application scenario graph-based parsing method described above.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, where the program includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the disclosure may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Furthermore, one of ordinary skill in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the present disclosure and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
It will be understood by those skilled in the art that while the present disclosure has been described with reference to exemplary embodiments, various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the present disclosure. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the disclosure without departing from the essential scope thereof. Therefore, it is intended that the disclosure not be limited to the particular embodiments disclosed, but that the disclosure will include all embodiments falling within the scope of the appended claims.

Claims (18)

1. An application scene graph-based analysis method is characterized by comprising the following steps:
acquiring an application scene graph corresponding to service requirements;
Screening an API corresponding to each operation node in the application scene graph from an API library based on an SDK mapping rule to obtain an API mapping list of the application scene graph, wherein the SDK mapping rule is obtained through SDK abstraction of a chip or a board card, the application scene graph is a structured file describing the logic relationship and configuration of each operation node in service requirements, the operation node is used for indicating at least one of video decoding, image preprocessing, reasoning and image coding operation, and the API mapping list is a support list used for representing the operation nodes;
determining an API call list of the application scene graph based on the API mapping list;
When the application scene graph contains a plurality of network scenes, the method further comprises the steps of carrying out series combination on a plurality of network models meeting the series combination relation in the application scene graph, and generating a corresponding network model relation configuration file based on the network models after series combination.
2. The method according to claim 1, wherein the method further comprises:
and acquiring the service requirement by one or more modes of a graphical interface configuration guide, a UI interaction interface, a command line mode, a text format file and a form file.
3. The method of claim 1, wherein the application scenario diagram is a structured file describing logical relationships and configurations of the operation nodes in the business requirements.
4. The method of claim 1, further comprising performing combinatorial optimization on a plurality of APIs in the API call list to obtain the application scenario graph optimized API call list.
5. The method of claim 4, wherein performing combinatorial optimization on the APIs in the API call list to obtain the application scenario graph optimized API call list includes combining APIs corresponding to the plurality of operation nodes that conform to a chip optimization policy into one API, and obtaining the application scenario graph optimized API call list based on the combined APIs.
6. The method of claim 5, wherein combining APIs corresponding to a plurality of operational nodes that meet a chip optimization policy into one API comprises:
If the calling sequence of the plurality of operation nodes accords with the chip optimization strategy, combining the APIs corresponding to the plurality of operation nodes into one API;
And if the calling sequences of part of the operation nodes are mutually exchanged, the new calling sequences of the operation nodes accord with a chip optimization strategy, and the APIs corresponding to the new calling sequences of the operation nodes are combined into one API.
7. The method of claim 1, wherein the performing the series combination of the plurality of network models satisfying the series combination relationship in the application scenario diagram comprises:
If the output of the first-stage network model enters the second-stage network model, the first-stage network model and the second-stage network model are connected in series and combined into a network;
and if the output of the first-stage network model enters the second-stage network model a and the second-stage network model b, the first-stage network model, the second-stage network model a and the second-stage network model b are combined into a network in series.
8. The method of claim 1, wherein the SDK mapping rules are based on SDK abstract acquisitions for chips or boards, one set of SDK mapping rules for each chip or board.
9. An application scene graph-based parsing system, characterized in that the method according to any one of claims 1-8 is adopted, the system comprising:
The application scene graph generation module is used for acquiring an application scene graph corresponding to the service requirement;
The API mapping list generation module is used for screening an API corresponding to each operation node in the application scene graph from an API library based on an SDK mapping rule to obtain an API mapping list of the application scene graph, wherein the SDK mapping rule is obtained through SDK abstraction of a chip or a board card, the application scene graph is a structured file for describing the logical relation and configuration of each operation node in service requirements, the operation nodes are used for indicating at least one of video decoding, image preprocessing, reasoning and image coding operation, and the API mapping list is a support list for representing the operation nodes;
an API call list generation module for determining an API call list of the application scenario graph based on the API mapping list;
when the application scenario diagram includes a multi-network scenario, the parsing system further includes:
And the multi-network model serial connection module is used for carrying out serial connection combination on a plurality of network models meeting the serial connection combination relation in the application scene graph and generating a corresponding network model relation configuration file based on the network models after serial connection combination.
10. The system of claim 9, wherein the business requirements are obtained by one or more of graphical interface configuration wizards, UI interaction interfaces, command line means, text format files, and form files.
11. The system of claim 9, wherein the application scenario diagram is a structured file describing logical relationships and configurations of the operational nodes in the business requirements.
12. The system of claim 9, wherein the system further comprises:
and the API combination optimization module is used for carrying out combination optimization on a plurality of APIs in the API call list to obtain the API call list after the application scene graph optimization.
13. The system of claim 12, wherein the API-combination optimization module performs combination optimization on a plurality of APIs in the API-call list to obtain the application scenario diagram-optimized API-call list, and comprises combining APIs corresponding to a plurality of operation nodes that conform to a chip optimization policy into one API, and obtaining the application scenario diagram-optimized API-call list based on the combined APIs.
14. The system of claim 13, wherein the API-combination optimizing module combines APIs corresponding to a plurality of operating nodes that conform to a chip optimization policy into one API, comprising:
If the calling sequence of the plurality of operation nodes accords with the chip optimization strategy, combining the APIs corresponding to the plurality of operation nodes into one API;
And if the calling sequences of part of the operation nodes are mutually exchanged, the new calling sequences of the operation nodes accord with a chip optimization strategy, and the APIs corresponding to the new calling sequences of the operation nodes are combined into one API.
15. The system of claim 9, wherein the multi-network model concatenation module concatenates the plurality of network models in the application scenario diagram that satisfy a concatenation combination relationship, comprising:
If the output of the first-stage network model enters the second-stage network model, the first-stage network model and the second-stage network model are connected in series and combined into a network;
and if the output of the first-stage network model enters the second-stage network model a and the second-stage network model b, the first-stage network model, the second-stage network model a and the second-stage network model b are combined into a network in series.
16. The system of claim 9, wherein the SDK mapping rules are based on SDK abstract acquisitions for chips or boards, each chip or board corresponding to a set of SDK mapping rules.
17. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any of claims 1-8.
18. A computer readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the method of any of claims 1-8.
CN202010167804.6A 2020-03-11 2020-03-11 A parsing method and system based on application scenario graph Active CN113391810B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010167804.6A CN113391810B (en) 2020-03-11 2020-03-11 A parsing method and system based on application scenario graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010167804.6A CN113391810B (en) 2020-03-11 2020-03-11 A parsing method and system based on application scenario graph

Publications (2)

Publication Number Publication Date
CN113391810A CN113391810A (en) 2021-09-14
CN113391810B true CN113391810B (en) 2025-03-07

Family

ID=77615427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010167804.6A Active CN113391810B (en) 2020-03-11 2020-03-11 A parsing method and system based on application scenario graph

Country Status (1)

Country Link
CN (1) CN113391810B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114863359A (en) * 2022-04-14 2022-08-05 创新奇智(成都)科技有限公司 Multi-scene detection method, apparatus, electronic device, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299862A (en) * 2008-06-11 2008-11-05 中国电信股份有限公司 Telecommunication service generation environmental system
CN103559028A (en) * 2013-10-24 2014-02-05 烽火通信科技股份有限公司 Method and device for achieving optical transport network (OTN) series chip software kit framework
CN107846435A (en) * 2016-09-20 2018-03-27 中国移动通信有限公司研究院 Business realizing system and method
CN110472516A (en) * 2019-07-23 2019-11-19 腾讯科技(深圳)有限公司 A kind of construction method, device, equipment and the system of character image identifying system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0793160A (en) * 1993-09-20 1995-04-07 Toshiba Corp Reasoning device
US7444595B2 (en) * 2003-08-13 2008-10-28 National Instruments Corporation Graphical programming system and method for creating and managing a scene graph
CN100459613C (en) * 2005-11-23 2009-02-04 北京邮电大学 Model driven fused business generating method adapt to different interfaces and platform technique
US8495566B2 (en) * 2009-07-28 2013-07-23 International Business Machines Corporation Widget combos: a widget programming model
CN103294475B (en) * 2013-06-08 2016-01-13 北京邮电大学 The business automatic creation system of graphic based business scenario and domain template and method
WO2019143412A1 (en) * 2018-01-19 2019-07-25 Umajin Inc. Configurable server kit
CN109840074B (en) * 2017-11-24 2021-02-23 华为技术有限公司 Service generation method, device and network equipment
CN108734761B (en) * 2018-04-02 2022-04-29 北京知道创宇信息技术股份有限公司 Scene visualization method and device, electronic equipment and storage medium
CN110321374B (en) * 2018-10-23 2022-03-25 开采夫(杭州)科技有限公司 Standard file IO operating system and method based on distributed network
CN110347445B (en) * 2019-07-12 2024-12-27 财付通支付科技有限公司 SDK calling method, device, server and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299862A (en) * 2008-06-11 2008-11-05 中国电信股份有限公司 Telecommunication service generation environmental system
CN103559028A (en) * 2013-10-24 2014-02-05 烽火通信科技股份有限公司 Method and device for achieving optical transport network (OTN) series chip software kit framework
CN107846435A (en) * 2016-09-20 2018-03-27 中国移动通信有限公司研究院 Business realizing system and method
CN110472516A (en) * 2019-07-23 2019-11-19 腾讯科技(深圳)有限公司 A kind of construction method, device, equipment and the system of character image identifying system

Also Published As

Publication number Publication date
CN113391810A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
US11016673B2 (en) Optimizing serverless computing using a distributed computing framework
CN111045655A (en) Page rendering method and device, rendering server and storage medium
CN111324619B (en) Object updating method, device, equipment and storage medium in micro-service system
CN113377419B (en) Service processing method and device, readable storage medium and electronic equipment
CN110750298B (en) AI model compiling method, equipment and storage medium
CN117492768A (en) Implementation method and system for cross-platform deployment of user network modalities based on abstract resource analysis
CN110781180A (en) Data screening method and data screening device
CN116204847A (en) Calculation graph optimization method, device and equipment
CN113391810B (en) A parsing method and system based on application scenario graph
CN113051173B (en) Method, device, computer equipment and storage medium for arranging and executing test flow
CN113391798B (en) A method and system for automatically optimizing configuration generation
CN113391795A (en) Method and system for realizing self-adaptive mapping of application scene and software development kit
CN115202623A (en) Service capability using method, device and equipment
CN117573758A (en) Data stream arrangement method based on BI platform
Petriu et al. Software performance models from system scenarios
CN114449063B (en) Message processing method, device and equipment
CN117234512A (en) Method and device for rapidly developing business, electronic equipment and storage medium
CN113992941B (en) Cloud-edge collaborative video analysis system and method based on serverless function computing
CN115796228A (en) Operator fusion method, device, equipment and storage medium
CN115729648A (en) Operator scheduling method, device and system based on directed acyclic graph
CN111401020A (en) Interface loading method and system and computing equipment
CN115951936B (en) Chip adaptation method, device, equipment and medium of vectorization compiler
CN113760226B (en) Service construction method, device, electronic equipment and storage medium
US20240281737A1 (en) Data compilation and execution device and data compilation and execution method
CN109284097A (en) Method, device, system and storage medium for realizing complex data analysis

Legal Events

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