Method and apparatus for generating dependence graph, device, storage medium and program product

US12056492B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12056492-B2
Application numberUS-202117780940-A
CountryUS
Kind codeB2
Filing dateAug 27, 2021
Priority dateFeb 26, 2021
Publication dateAug 6, 2024
Grant dateAug 6, 2024

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method of generating a dependence graph, an apparatus, a device, a storage medium and a program product are provided. The method includes: obtaining a hook API used by a function component; obtaining a parameter value of the hook API used by the function component; and generating a dependence graph. The hook API corresponds to a hook node in the dependence graph, the parameter value corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node.

First claim

Opening claim text (preview).

What is claimed is: 1. A method of generating a dependence graph, comprising: obtaining a hook application programming interface (API) used by a function component; obtaining a parameter value of the hook API used by the function component; and generating the dependence graph, wherein the hook API corresponds to a hook node in the dependence graph, the parameter value of the hook API corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node; wherein the method further comprises: in a case that the hook API used by the function component comprises a customized hook API, performing a recursive analysis on the customized hook API to obtain an atomic hook API directly; and in a case that there is a further hook API in addition to the atomic hook API obtained through the recursive analysis, obtaining a parameter value of the atomic hook API, and obtaining a parameter value of the further hook API in addition to the atomic hook API obtained through the recursive analysis, wherein the dependence graph further comprises: a hook node corresponding to the atomic hook API, a hook node corresponding to the further hook API, a value node corresponding to the parameter value of the atomic hook API and a value node corresponding to the parameter value of the further hook API, and there is a connection relationship between each value node and a corresponding hook node. 2. The method according to claim 1 , further comprising: in a case that the dependence graph comprises a target value node of a new identifier capable of being obtained through an expression, generating a value node corresponding to the new identifier in the dependence graph, and establishing a connection relationship between the target value node and the value node of the new identifier. 3. The method according to claim 1 , further comprising: obtaining an extensible markup language (XML) expression of a top level of the function component; generating a component node corresponding to the XML expression of the top level in the dependence graph; and in a case that the XML expression of the top level comprises a target XML expression referring to an identifier of a value node in the dependence graph, establishing a connection relationship between the target XML expression and a corresponding value node in the dependence graph. 4. The method according to claim 3 , wherein generating the component node corresponding to the XML expression of the top level in the dependence graph comprises: simplifying a syntax tree of the XML expression of the top level to obtain an XML expression of at least one predetermined level, and generating a component node corresponding to the XML expression of the at least one predetermined level in the dependence graph. 5. An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory is configured to store instructions executable by the at least one processor, and the instructions, when being executed by the at least one processor, cause the at least one processor to perform: obtaining a hook application programming interface (API) used by a function component; obtaining a parameter value of the hook API used by the function component; and generating the dependence graph, wherein the hook API corresponds to a hook node in the dependence graph, the parameter value of the hook API corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node; wherein the instructions, when being executed by the at least one processor, cause the at least one processor to further perform: in a case that the hook API used by the function component comprises a customized hook API, performing a recursive analysis on the customized hook API to obtain an atomic hook API directly; and in a case that there is a further hook API in addition to the atomic hook API obtained through the recursive analysis, obtaining a parameter value of the atomic hook API, and obtaining a parameter value of the further hook API in addition to the atomic hook API obtained through the recursive analysis, wherein the dependence graph further comprises: a hook node corresponding to the atomic hook API, a hook node corresponding to the further hook API, a value node corresponding to the parameter value of the atomic hook API and a value node corresponding to the parameter value of the further hook API, and there is a connection relationship between each value node and a corresponding hook node. 6. The electronic device according to claim 5 , wherein the instructions, when being executed by the at least one processor, cause the at least one processor to further perform: in a case that the dependence graph comprises a target value node of a new identifier capable of being obtained through an expression, generating a value node corresponding to the new identifier in the dependence graph, and establishing a connection relationship between the target value node and the value node of the new identifier. 7. The electronic device according to claim 5 , wherein the instructions, when being executed by the at least one processor, cause the at least one processor to further perform: obtaining an extensible markup language (XML) expression of a top level of the function component; generating a component node corresponding to the XML expression of the top level in the dependence graph; and in a case that the XML expression of the top level comprises a target XML expression referring to an identifier of a value node in the dependence graph, establishing a connection relationship between the target XML expression and a corresponding value node in the dependence graph. 8. The electronic device according to claim 7 , wherein generating the component node corresponding to the XML expression of the top level in the dependence graph comprises: simplifying a syntax tree of the XML expression of the top level to obtain an XML expression of at least one predetermined level, and generating a component node corresponding to the XML expression of the at least one predetermined level in the dependence graph. 9. A non-transitory computer-readable storage medium, storing computer instructions, wherein the computer instructions, when being executed by a computer, cause the computer to perform: obtaining a hook application programming interface (API) used by a function component; obtaining a parameter value of the hook API used by the function component; and generating the dependence graph, wherein the hook API corresponds to a hook node in the dependence graph, the parameter value of the hook API corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node; wherein the computer instructions, when being executed by the computer, cause the computer to further perform: in a case that the hook API used by the function component comprises a customized hook API, performing a recursive analysis on the customized hook API to obtain an atomic hook API directly; and in a case that there is a further hook API in addition to the atomic hook API obtained through the recursive analysis, obtaining a parameter value of the atomic hook API, and obtaining a parameter value of the further hook API in addition to the atomic hook API obtained through the recursive analysis, wherein the dependence graph further comprises: a hook node corresponding to the atomic hook API, a hook node corresponding to the further hook API, a value node corresponding to the parameter value of the atomic hook API an

Assignees

Inventors

Classifications

  • via adapters, e.g. between incompatible applications · CPC title

  • Syntactic analysis · CPC title

  • Executing subprograms · CPC title

  • G06F9/3838Primary

    Dependency mechanisms, e.g. register scoreboarding · CPC title

  • G06F8/433Primary

    Dependency analysis; Data or control flow analysis · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12056492B2 cover?
A method of generating a dependence graph, an apparatus, a device, a storage medium and a program product are provided. The method includes: obtaining a hook API used by a function component; obtaining a parameter value of the hook API used by the function component; and generating a dependence graph. The hook API corresponds to a hook node in the dependence graph, the parameter value correspon…
Who is the assignee on this patent?
Beijing Baidu Netcom Sci & Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F9/3838. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 06 2024 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 3 related publications on this page (citations in our corpus or others sharing the same primary CPC).