Method and apparatus for executing task on data object, device, and medium

By using virtual machine management rules with embedded functions, the problem of inflexible rule definition in existing technologies is solved, enabling efficient and flexible updating and management of rules in the programming language environment, thereby improving the scalability and maintainability of application development.

WO2026117998A1PCT designated stage Publication Date: 2026-06-11BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-12-04
Publication Date
2026-06-11

AI Technical Summary

Technical Problem

The lack of flexibility in rule definition in existing technologies leads to poor scalability and maintainability of application development. Hard-coding methods require frequent code modifications, and rule management tools have high learning costs and insufficient stability.

Method used

By leveraging the virtual machine management rules of embedded functions, the attributes and rules of data objects are obtained through programming languages. The rules are updated independently of the code. The embedded language is used to determine whether the attributes meet the rules, and the task is executed in response to the results.

🎯Benefits of technology

It enables flexible rule management without modifying application code, reducing development and maintenance costs and improving the efficiency and flexibility of rule management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024136926_11062026_PF_FP_ABST
    Figure CN2024136926_11062026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a method and apparatus for executing a task on a data object, a device, and a medium. The method (600) comprises: acquiring a rule associated with an attribute of a data object, wherein the rule represents a condition for executing a task on the data object (610); using the attribute and the rule to set a virtual machine for calling an embedded function, wherein the embedded function is used for determining whether the attribute satisfies the rule, and the embedded function is written by using an embedded language (620); on the basis of a return result of the virtual machine, determining whether the attribute satisfies the rule (630); in response to determining that the return result indicates that the attribute satisfies the rule, executing a task on the data object (640). A virtual machine may be used to manage rules, so as to execute tasks on the basis of the rules in a more efficient manner.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, devices and media for performing tasks on data objects Technical Field

[0001] The exemplary implementations of this disclosure generally relate to task processing, and more particularly to methods, apparatus, devices, and computer-readable storage media for performing tasks on data objects. Background Technology

[0002] Applications can involve various data objects and perform different tasks on these objects to achieve desired functionality. During application execution, multiple rules may be involved. For example, it's possible to define which tasks to perform on data objects if a certain rule is met. However, in current application development, rule definition lacks flexibility and may involve additional rule management tools. This results in unsatisfactory scalability and maintainability of the application. Therefore, a more efficient way to manage tasks is desired. Summary of the Invention

[0003] In a first aspect of this disclosure, a method for performing a task on a data object is provided. In this method, rules associated with attributes of the data object are obtained, the rules representing conditions for performing a task on the data object. Using the attributes and rules, a virtual machine is set up for calling an embedded function, the embedded function being used to determine whether the attribute satisfies the rules, and the embedded function being written using an embedded language. Based on the return result of the virtual machine, it is determined whether the attribute satisfies the rules. In response to the determination that the return result indicates that the attribute satisfies the rules, the task is performed on the data object.

[0004] In a second aspect of this disclosure, an apparatus for performing a task on a data object is provided. The apparatus includes: an acquisition module configured to acquire rules associated with attributes of the data object, the rules representing conditions for performing a task on the data object; a setting module configured to use the attributes and rules to set up a virtual machine for calling an embedded function, the embedded function being used to determine whether the attribute satisfies the rules, and the embedded function being written using an embedded language; a determination module configured to determine whether the attribute satisfies the rules based on the return result of the virtual machine; and an execution module configured to perform a task on the data object in response to the determination that the return result indicates that the attribute satisfies the rules.

[0005] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to a first aspect of this disclosure when executed by the at least one processing unit.

[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to a first aspect of this disclosure.

[0007] In a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to a first aspect of this disclosure.

[0008] It should be understood that the content described in this content section is not intended to limit the key or essential features of the implementation of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0009] In the following detailed description, the above and other features, advantages, and aspects of the various implementations of this disclosure will become more apparent, taken in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0010] Figure 1 shows a block diagram of an application environment according to an exemplary implementation of the present disclosure;

[0011] Figure 2 shows a block diagram of some implementations of this disclosure for performing tasks on data objects;

[0012] Figure 3 shows a block diagram illustrating the structure of a dataset according to some implementations of this disclosure;

[0013] Figure 4 shows a block diagram of the expression for the determination rule according to some implementations of this disclosure;

[0014] Figure 5 shows a block diagram illustrating the presentation of media items in an application according to some implementations of this disclosure;

[0015] Figure 6 shows a flowchart of a method for performing tasks on data objects according to some implementations of this disclosure;

[0016] Figure 7 shows a block diagram of an apparatus for performing tasks on data objects according to some implementations of the present disclosure; and

[0017] Figure 8 shows a block diagram of a device capable of implementing various implementations of the present disclosure. Detailed Implementation

[0018] Implementations of this disclosure will now be described in more detail with reference to the accompanying drawings. While some implementations of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the implementations set forth herein. Rather, these implementations are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and implementations of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0019] In the description of the implementation methods disclosed herein, the term "comprising" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one implementation" or "the implementation" should be understood as "at least one implementation". The term "some implementations" should be understood as "at least some implementations". Other explicit and implicit definitions may also be included below. As used herein, the term "model" can represent the relationships between various data. For example, the aforementioned relationships can be obtained based on various currently known and / or future-developed technical solutions.

[0020] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0021] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.

[0022] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0023] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, for example, via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose whether to "agree" or "disagree" to provide personal information to the electronic device.

[0024] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0025] The term "in response to" as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of subsequent actions performed in response to such event or condition is not necessarily strongly correlated with the time when the event occurs or the condition is met. For example, in some cases, subsequent actions may be performed immediately upon the occurrence of the event or the fulfillment of the condition; while in others, they may be performed some time after the occurrence of the event or the fulfillment of the condition.

[0026] Example Environment

[0027] An application may involve multiple data objects and can perform different tasks on these data objects to achieve the desired functionality. During application execution, multiple rules may be involved. For example, it may be defined that a corresponding task is performed on a data object when a certain rule is met. Referring to Figure 1, which describes an overview of an application environment according to some implementations of this disclosure, Figure 1 shows a block diagram 100 of an application environment according to an exemplary implementation of this disclosure. As shown in Figure 1, code 120 can be written to implement the functionality of application 130. The application may involve multiple data objects, and it may be defined that a task is performed when a certain attribute of a data object meets a predetermined rule.

[0028] For example, rule 110 can be written in code 120, which specifies that if the attribute "attr1" in the data object "object1" meets a predetermined condition (e.g., greater than a predetermined threshold "THRESHOLD1"), task "task1" is executed. As another example, code 120 can include rule 112, which specifies that if the attribute "attr1" in the data object "object1" does not meet a predetermined condition (e.g., less than or equal to the predetermined threshold "THRESHOLD1"), task "task2" is executed.

[0029] Figure 1 schematically illustrates the method of referencing rules based on hard-coding (e.g., writing rules directly into the code). However, the hard-coding method has poor scalability; when new rules need to be introduced, the code must be rewritten. Furthermore, the hard-coding method has poor maintainability; when the code includes a large number of rules, developers find it difficult to locate the code segment corresponding to a specific rule, resulting in excessive maintenance costs. Further, the use of dedicated rule management tools (e.g., third-party developed rule engines) has been proposed to manage rules. However, developers need to learn how to use these tools, resulting in a high learning curve. Furthermore, rule management tools may depend on other underlying libraries and lack stability. Therefore, a more efficient method for rule-based task management is desired.

[0030] Overview of Task Management

[0031] To at least partially address the shortcomings of the prior art, a method for performing tasks on data objects is proposed according to an exemplary implementation of this disclosure. In summary, within the context of this disclosure, a programming language can be used to develop the main code portion of the application, and embedded functions can be used within that programming language environment to execute rule-related functionalities. In this way, the dependency between the code and the rules can be reduced, thereby enabling a more efficient way to perform corresponding tasks on data objects while complying with the rules.

[0032] Referring to Figure 2, which describes an outline of an exemplary implementation of the present disclosure, Figure 2 illustrates a block diagram 200 for performing a task on a data object according to some implementations of the present disclosure. As shown in Figure 2, a data object 210 can be identified, which may have an attribute 212. A rule 220 associated with the attribute 212 of the data object 210 can be obtained. Here, rule 220 may represent the conditions for performing a task on the data object. For example, rule 220 may specify that task 240 is performed if attribute 1 of object 1 > threshold 1.

[0033] A virtual machine 230 for calling an embedded function 232 can be configured using attribute 212 and rule 220. Here, the embedded function 232 can be written in an embedded language and is used to determine whether an attribute satisfies a rule. Furthermore, the determination of whether an attribute satisfies a rule can be based on the virtual machine's return result. In response to the determination that the return result indicates the attribute satisfies the rule, a task can be performed on the data object. Using the exemplary implementation of this disclosure, rules can be managed using a virtual machine independently of the code, thereby performing corresponding tasks on data objects that conform to the rules in a more efficient manner. Furthermore, rules can be updated directly without modifying the application's code.

[0034] Detailed process of task management

[0035] Having outlined some implementations of this disclosure, further details regarding methods for performing tasks on data objects will be described below. For ease of description, the process of performing tasks will be described in the context of this disclosure using a media application as an example of an application and a media item as an example of a data object. Here, a media item may include, for example, video, short video, audio, text, image, or a combination thereof, etc. The task performed on the media object may include, for example, a rendering task, that is, rendering the media item within the media application.

[0036] According to some implementations of this disclosure, media applications can be developed based on a programming language, and supported embedded languages ​​can be called within the programming language environment. For example, the programming language may include, but is not limited to, Go, Java, etc. Embedded languages ​​may include, but are not limited to, LUA, JavaScript, Tengo, etc. For instance, assuming an application is developed using Go, LUA can be called. It should be understood that the various languages ​​described above are merely illustrative, and alternatively and / or additionally, other programming languages ​​and embedded languages ​​can be selected based on the specific needs of the development environment.

[0037] According to some implementations of this disclosure, the attributes of a data object can be obtained. For example, the attributes of a data object corresponding to a rule can be queried. One or more rules can be set; assuming the rule involves attribute 1 of data object 1, the specific value of attribute 1 can be determined. A two-dimensional array can be constructed to store the retrieved attributes; see Figure 3 for more details. Figure 3 shows a block diagram 300 of the structure of a dataset according to some implementations of this disclosure. As shown in Figure 3, the retrieved information can be stored in dataset 310. Dataset 310 may include multiple columns, each storing relevant data of the data object.

[0038] Specifically, the data source can represent the origin of the data object, such as from provider source1 or other sources. The data object can represent the data object specified in the rule (e.g., object1; in the context of the media application described above, the data object can represent a media item). Attribute 1 can represent the value attr1 of the attribute to be compared specified in the rule (e.g., interest metric 1). For a media item, the interest metric may include, for example, the resource overhead involved in the media item, the impact of the media item (e.g., the number of clicks, shares, or other conversion events generated), etc. In the context of this disclosure, a rule can involve one or more attributes; for example, attribute 2 represents the value attr2 of another attribute to be compared specified in the rule (e.g., interest metric 1). According to some implementations of this disclosure, multiple rows can be written to the dataset 310, each row representing a data object to be processed.

[0039] According to some implementations of this disclosure, a code-independent rule database can be defined. The rule database can be implemented in various formats; for example, rules can be stored using data tables or custom file formats. For instance, a user interface can be provided for setting rules, allowing developers to add new rules, delete existing rules, or update existing rules. See Figure 4 for further details on reading rules; Figure 4 shows a block diagram 400 illustrating the expression for determining rules according to some implementations of this disclosure.

[0040] As shown in Figure 4, rule 220 can specify one or more rules to be compared in data object 1. Specifically, rule 220 can specify that attribute 1 of data object 1 should be greater than threshold 1. It should be understood that the rules in Figure 4 are merely illustrative, and alternatively and / or additionally, rules can be defined in other formats. For example, a data object can have one or more rules, one rule can specify: object1.attr1>THRESHOLD1 (attribute 1 of data object 1 should be greater than threshold THRESHOLD1); another rule can specify: object1.attr2>THRESHOLD2 (attribute 2 of data object 1 should be greater than threshold THRESHOLD2), and so on.

[0041] As shown in Figure 4, at least one of the following can be read from the rule database: lvalue, rvalue, and operator. As shown in Figure 4, the lvalue 420 can represent the identifier of the target attribute to be compared, that is, the part on the left side of the rule. For media items, the lvalue can represent the number of clicks, the number of shares, etc. The rvalue 422 can represent the threshold of the target attribute, that is, the part on the right side of the rule. For media items, the rvalue can represent the threshold for clicks (e.g., 1000), the threshold for shares (e.g., 500), etc. The operator 424 can represent the relationship between the lvalue 420 and the rvalue 422. Here, the relationship can include, but is not limited to: greater than, less than, equal to, greater than or equal to, less than or equal to, not equal to, etc.

[0042] Subsequently, rules can be determined based on lvalues, operators, and rvalues. Using some implementation methods disclosed herein, rules can be decoupled from code for more flexible and efficient rule management. For example, developers can add, delete, or update rules in the rule database without modifying application code or using specialized rule management tools.

[0043] According to some implementations of this disclosure, various data structures can be set up to store rules. For example, Table 1 shows an example of a data structure for storing rules. In Table 1, “left{…}” represents multiple pieces of information related to the left-hand value, “operator” represents the operator, and “right{…}” represents multiple pieces of information related to the right-hand value. It should be understood that the data structure in Table 1 is merely illustrative, and the left-hand value, right-hand value, and operator can be defined in other ways. For example, the left-hand value and right-hand value may include more, fewer, or different fields. It should be understood that Table 1 only illustratively shows one rule, and alternatively and / or additionally, more rules can be provided.

[0044] Table 1 shows an example of the data structure for storage rules.

[0045] According to some implementations of this disclosure, the lvalue, expression, and rvalue determined according to the steps described above can be combined to determine the rules used as the basis for comparison. It should be understood that the rules determined at this point can be in string form, thus requiring conversion of this string form into expressions (i.e., code) supported by the virtual machine. Specifically, during the virtual machine setup process, rules can be converted into expressions supported by the virtual machine based on attributes. For example, the specific numerical values ​​of attributes matching the lvalue can be determined from the dataset, thereby obtaining an executable expression in the embedded language environment. Using some implementations of this disclosure, rules extracted from the rule database can be automatically converted into executable code, thereby executing the corresponding task based on whether the attribute conforms to the rule without modifying the application code.

[0046] According to some implementations of this disclosure, after obtaining the rules and attributes, the rules can be converted into expressions supported by the virtual machine. Specifically, the virtual machine can be initialized, attributes can be registered to the virtual machine's data variables, and rvalues ​​can be registered to the virtual machine's environment variables. For example, in a Go environment, the LUA virtual machine can be initialized based on the statement "L:=lua.NewState()". Alternatively and / or additionally, the extracted string-form rules can be preprocessed, for example, by removing extra spaces, etc.

[0047] According to some implementations of this disclosure, methods in the LUA language can be called to register attributes to virtual machine data variables. Specifically, attributes can be converted into numerical values ​​in a format supported by the virtual machine, and then the data variable can be set to that numerical value. It should be understood that attributes can have different formats, such as strings, int64 (64-bit integers), int32 (32-bit integers), etc. In this case, the specific numerical value of the attribute can be converted to the corresponding format. For example, data variables can be registered in the virtual machine based on the code snippet shown in Table 2. In this code snippet, the "case string" part is used to perform conversions associated with string types, the "case int64" part is used to perform conversions associated with int64 types, and the "case int32" part is used to perform conversions associated with int32 types, and so on.

[0048] Table 2 shows the code snippet for registering data variables in the virtual machine.

[0049] According to some implementations of this disclosure, methods in the LUA language can be called to register rvalues ​​to the virtual machine's environment variables. Specifically, the rvalue can be converted to a numerical value in a format supported by the virtual machine, and the environment variable can be set to that value. It should be understood that the rvalue extracted from the rules can have different formats, such as strings, int64 (64-bit integers), int32 (32-bit integers), etc. In this case, the specific numerical value of the rvalue can be converted to the corresponding format. Similar to Table 2, environment variables can be registered in the virtual machine based on the code snippets shown in Table 3.

[0050] Table 3 shows the code snippets for registering environment variables in a virtual machine.

[0051] According to some implementation methods of this disclosure, rules can be converted into executable LUA expressions based on the methods described above. For example, based on rule 1: "attribute1>threshold1", we can obtain: attr1>THRESHOLD1. Assuming THRESHOLD1 = 1000, this expression is used to determine whether the number of clicks on a media item is greater than 1000. As another example, based on rule 2: "attribute2>threshold2", we can obtain: attr2>THRESHOLD2. Assuming THRESHOLD2 = 500, this expression is used to determine whether the number of reposts on a media item is greater than 500. According to some implementation methods of this disclosure, the validity of the above expressions can be determined in a virtual machine; for example, the code segment shown in Table 4 can be called.

[0052] Table 4 Code snippets for running the virtual machine

[0053] As shown in Table 4, the function `match(data)` represents a function written in the LUA language (e.g., including the statement `attr1>THRESHOLD1`). This function can be called to determine whether the attributes of a data object meet the corresponding rules. Specifically, assuming the number of clicks on a media item is greater than 1000, the virtual machine returns "TRUE" otherwise it returns "FALSE".

[0054] According to some implementations of this disclosure, it is possible to determine whether to perform a task on the object based on the returned result. Specifically, in response to determining that the returned result indicates that the attribute satisfies the rule, a task is performed on the object; otherwise, no task is performed. For rule 1, assuming the current click count of the media item is 1100 > 1000, the media item can be presented in the media application; assuming the current click count of the media item is 900 < 1000, the media item will not be presented in the media application. Using some implementations of this disclosure, the rule-related parts can be processed in the virtual machine of the embedded language, and the parts related to application functionality can be processed in the programming language environment. In this way, rules and code can be isolated, thereby facilitating rule updates in a more flexible and efficient manner.

[0055] According to some implementations of this disclosure, attributes may include multiple attributes, and rules may include multiple rules corresponding to the multiple attributes respectively. Determining that a returned result indicates that an attribute satisfies a rule includes: in response to determining that multiple attributes respectively satisfy multiple rules, determining that a returned result indicates that an attribute satisfies a rule. Specifically, one or more rules can be applied to a data object. For example, the methods described above can be used to apply multiple rules separately to determine multiple sets of data objects that respectively conform to each rule. Furthermore, the intersection of multiple sets of data objects can be determined, thereby determining the data object that satisfies all rules.

[0056] Continuing with the example above, for rule 2, the corresponding embedded function could include the statement `attr2>THRESHOLD2`. If the media forwarding count is greater than 500, the virtual machine returns "TRUE"; otherwise, it returns "FALSE". Assuming the media item's forwarding count is 600 > 500, it can be determined that the data object satisfies both rules simultaneously. Furthermore, media items that satisfy multiple rules can be presented in media applications.

[0057] Figure 5 shows a block diagram 500 of presenting media items in an application according to some implementations of this disclosure. As shown in Figure 5, media items that meet predetermined rules can be specified for presentation in the application. For example, rule 510 can be defined in the rule database: the media item has more than 1000 clicks and the media item has more than 500 shares. In this case, the click and share counts of each media item in the media set can be obtained according to the method described above. An embedded function can be called in the virtual machine to determine the media items that simultaneously meet the above multiple rules. Furthermore, the determined media items can be presented in the application. Using some implementations of this disclosure, rules can be set independently of the application code. For example, developers can directly update the rule database to add new rules, delete outdated rules, or modify existing rules without modifying the code.

[0058] According to some implementations of this disclosure, although the above description uses clicks and shares as examples of attributes to illustrate the specific content of the rules, alternatively and / or additionally, the attributes in the rules may include interest metrics associated with the presented media item. For example, assuming the number of comments on a media item is expected to be presented exceeds a predetermined threshold of 100, a rule can be added to the media database based on the above rules 1 and 2: the number of comments on the media item exceeds 100. In this case, the media item to be presented can be determined based on three rules related to clicks, shares, and comments, respectively. In this way, the various attributes in the rules can be flexibly specified based on each interest metric.

[0059] It should be understood that although the examples above, using Go as a programming language and LUA as an embedded language, describe the process of performing tasks based on rules, alternatively and / or additionally, the above process can be performed in other languages. For example, application code can be developed in Java, and embedded functions written in JavaScript can be embedded within that code. Using some implementations of this disclosure, it is possible to support the development of applications in multiple languages ​​and the management of rules involved in applications in multiple embedded languages.

[0060] Example process

[0061] Figure 6 illustrates a flowchart of a method 600 for performing a task on a data object according to some implementations of this disclosure. At block 610, rules associated with attributes of the data object are obtained, the rules representing the conditions for performing a task on the data object. At block 620, using the attributes and rules, a virtual machine for calling an embedded function is set up. The embedded function is used to determine whether the attributes satisfy the rules, and the embedded function is written using an embedded language. At block 630, based on the return result of the virtual machine, it is determined whether the attributes satisfy the rules. At block 640, in response to the determination that the return result indicates that the attributes satisfy the rules, a task is performed on the data object.

[0062] According to some implementations of this disclosure, obtaining rules includes: reading at least one of the following from a rule database: an lvalue, representing the identifier of the target attribute; an rvalue, representing the threshold of the target attribute; and an operator, representing the association between the lvalue and the rvalue; and determining the rule based on the lvalue, the operator, and the rvalue.

[0063] According to some implementations of this disclosure, setting up the virtual machine includes: converting rules into expressions supported by the virtual machine based on attributes.

[0064] According to some implementations of this disclosure, converting rules into expressions supported by the virtual machine includes: initializing the virtual machine; registering attributes to data variables of the virtual machine; and registering rvalues ​​to environment variables of the virtual machine.

[0065] According to some implementations of this disclosure, registering attributes to data variables of a virtual machine includes: converting the attributes into numerical values ​​in a format supported by the virtual machine; and setting the data variables to numerical values.

[0066] According to some implementations of this disclosure, registering an rvalue to a virtual machine's environment variable includes: converting the rvalue to a numerical value in a format supported by the virtual machine; and setting the environment variable to a numerical value.

[0067] According to some implementations of this disclosure, the attribute includes multiple attributes, and the rule includes multiple rules corresponding to the multiple attributes respectively, and determining that the returned result indicates that the attribute satisfies the rule includes: in response to determining that the multiple attributes respectively satisfy the multiple rules, determining that the returned result indicates that the attribute satisfies the rule.

[0068] According to some implementations of this disclosure, the method is implemented in an environment using a programming language different from the embedded language.

[0069] According to some implementations of this disclosure, the data object is a media item, and the attributes include interest metrics associated with the presentation of the media item, and the task includes presenting the media item.

[0070] Example devices and equipment

[0071] Figure 7 shows a block diagram of an apparatus 700 for performing a task on a data object according to some implementations of the present disclosure. The apparatus 700 includes: an acquisition module 710 configured to acquire rules associated with attributes of the data object, the rules representing conditions for performing a task on the data object; a setting module 720 configured to use the attributes and rules to set up a virtual machine for calling an embedded function, the embedded function being used to determine whether the attribute satisfies the rules, and the embedded function being written using an embedded language; a determination module 730 configured to determine whether the attribute satisfies the rules based on the return result of the virtual machine; and an execution module 740 configured to perform a task on the data object in response to the determination that the return result indicates that the attribute satisfies the rules.

[0072] According to some implementations of this disclosure, the acquisition module 710 is further configured to: read at least one of the following from the rule database: an lvalue, representing the identifier of the target attribute; an rvalue, representing the threshold of the target attribute; and an operator, representing the association between the lvalue and the rvalue; and determine a rule based on the lvalue, the operator, and the rvalue.

[0073] According to some implementations of this disclosure, the setting module 720 is further configured to: convert rules into expressions supported by the virtual machine based on attributes.

[0074] According to some implementations of this disclosure, the setting module 720 is further configured to: initialize the virtual machine; register attributes to data variables of the virtual machine; and register rvalues ​​to environment variables of the virtual machine.

[0075] According to some implementations of this disclosure, the setting module 720 is further configured to: convert attributes into numerical values ​​in a format supported by the virtual machine; and set data variables to numerical values.

[0076] According to some implementations of this disclosure, the setting module 720 is further configured to: convert rvalues ​​to numeric values ​​in a format supported by the virtual machine; and set environment variables to numeric values.

[0077] According to some implementations of this disclosure, the attributes include multiple attributes, and the rules include multiple rules corresponding to the multiple attributes respectively, and the determination module 730 is further configured to: determine the return result indicating that the attribute satisfies the rules in response to determining that the multiple attributes satisfy the multiple rules respectively.

[0078] According to some implementations of this disclosure, the device 700 is implemented in an environment using a programming language different from embedded languages.

[0079] According to some implementations of this disclosure, the data object is a media item, and the attributes include interest metrics associated with the presentation of the media item, and the task includes presenting the media item.

[0080] Figure 8 shows a block diagram of a device 800 capable of implementing various implementations of the present disclosure. It should be understood that the computing device 800 shown in Figure 8 is merely exemplary and should not constitute any limitation on the functionality and scope of the implementations described herein. The computing device 800 shown in Figure 8 can be used to implement the methods described above.

[0081] As shown in Figure 8, the computing device 800 is in the form of a general-purpose computing device. Components of the computing device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage devices 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. The processing unit 810 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the computing device 800.

[0082] Computing device 800 typically includes multiple computer storage media. Such media can be any available media accessible to computing device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 820 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 830 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within computing device 800.

[0083] The computing device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG8, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules configured to perform various methods or actions of various implementations of the present disclosure.

[0084] The communication unit 840 enables communication with other computing devices via a communication medium. Additionally, the components of the computing device 800 can function as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the computing device 800 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or another network node.

[0085] Input device 850 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 860 can be one or more output devices, such as a monitor, speaker, printer, etc. Computing device 800 can also communicate as needed with one or more external devices (not shown) via communication unit 840. These external devices, such as storage devices, display devices, etc., can communicate with one or more devices that enable user interaction with computing device 800, or with any device (e.g., network card, modem, etc.) that enables computing device 800 to communicate with one or more other computing devices. Such communication can be performed via input / output (I / O) interfaces (not shown).

[0086] According to exemplary implementations of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to exemplary implementations of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above. According to exemplary implementations of this disclosure, a computer program product is provided that stores a computer program thereon, which, when executed by a processor, implements the methods described above.

[0087] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0088] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0089] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0090] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0091] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A method for performing tasks on data objects, comprising: Obtain rules associated with the attributes of the data object, the rules representing the conditions for performing the task on the data object; Using the attributes and rules, a virtual machine is set up to call an embedded function, which is used to determine whether the attributes satisfy the rules and is written in an embedded language. Based on the return result of the virtual machine, determine whether the attribute satisfies the rule; as well as In response to determining that the returned result indicates that the attribute satisfies the rule, the task is performed on the data object.

2. The method according to claim 1, wherein obtaining the rule comprises: Read at least one of the following from the rule database: An lvalue represents the identifier of the target attribute; The right-hand value represents the threshold value of the target attribute; as well as Operators that represent the relationship between the left-hand value and the right-hand value; as well as The rule is determined based on the lvalue, the operator, and the rvalue.

3. The method according to claim 2, wherein setting the virtual machine includes: Based on the attributes, the rules are converted into expressions supported by the virtual machine.

4. The method of claim 3, wherein converting the rule into the expression supported by the virtual machine comprises: Initialize the virtual machine; Register the attribute to the data variable of the virtual machine; as well as Register the rvalue to the virtual machine's environment variables.

5. The method of claim 4, wherein registering the attribute to the data variable of the virtual machine comprises: Convert the attribute into a numerical value in a format supported by the virtual machine; as well as Set the data variable to the specified value.

6. The method of claim 4, wherein registering the rvalue to the environment variable of the virtual machine comprises: Convert the rvalue to a numerical value in a format supported by the virtual machine; as well as Set the environment variable to the specified value.

7. The method of claim 1, wherein the attribute includes a plurality of attributes, and the rule includes a plurality of rules corresponding to the plurality of attributes respectively, and determining that the returned result indicates that the attribute satisfies the rule includes: In response to determining that the plurality of attributes respectively satisfy the plurality of rules, the returned result indicates that the attribute satisfies the rule.

8. The method of claim 1, wherein the method is implemented in an environment of a programming language different from the embedded language.

9. The method of claim 1, wherein the data object is a media item, and the attributes include an interest metric associated with presenting the media item, and the task includes presenting the media item.

10. An apparatus for performing a task on a data object, comprising: The acquisition module is configured to acquire rules associated with the attributes of the data object, the rules representing the conditions for performing the task on the data object; The configuration module is configured to use the attributes and the rules to configure a virtual machine for calling an embedded function, the embedded function being used to determine whether the attributes satisfy the rules, and the embedded function being written using an embedded language; The determination module is configured to determine whether the attribute satisfies the rule based on the return result of the virtual machine; as well as An execution module is configured to perform the task on the data object in response to determining that the return result indicates that the attribute satisfies the rule.

11. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, the computer program causing the processor to implement the method according to any one of claims 1 to 9 when executed by a processor.

13. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 9.