Information processing method and related device
The method improves information processing efficiency and flexibility by determining target conversion tasks and executing multiple units in a specific order, addressing the inflexibility and inefficiency of existing technologies in handling large data volumes for personalized services.
Patent Information
- Application Number
- CN202411025429.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-12-17
AI Technical Summary
Existing information processing technologies lack flexibility and efficiency, particularly in handling large volumes of data from the Internet industry, leading to poor performance in providing personalized services due to inflexible and inefficient information conversion processes.
An information processing method and device that involves receiving initial information, determining a target conversion task, acquiring intermediate information from multiple conversion units, and executing these units in a specific order to obtain target information, allowing for flexible and efficient processing across various scenarios.
This approach enhances information processing efficiency and flexibility by enabling real-time dynamic control, reducing repeated development, and improving system stability and reliability through decoupled task configuration and execution.
Smart Images

Figure CN119149186A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an information processing method and related devices. Background Art
[0002] With the development and progress of science and technology, in order to meet the needs of personalized services, basic information of users, user behavior information, environmental information, device information and other related information are needed to generate the required target information after processing, and provide personalized business services to users based on the target information. For example, after converting information based on user historical resource interaction information, user account information and other information, the user's available resource quota can be obtained, and relevant resource interaction services can be provided to users based on the available resource quota.
[0003] Therefore, how to efficiently process some initial information such as basic information, object behavior information or environmental information to obtain the target information of the object has become one of the hot issues in the current research field of information processing. Summary of the invention
[0004] Based on this, it is necessary to provide an information processing method, apparatus, computer device, computer-readable storage medium and computer program product that can improve flexibility and efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides an information processing method, comprising:
[0006] Receive initial information of the target object; wherein the initial information includes an information identifier;
[0007] Determine a target information conversion task that matches the information identifier, wherein the target information conversion task corresponds to M information conversion units, where M is a positive integer;
[0008] Acquire the intermediate information of the M information conversion units;
[0009] The M information conversion units are executed in an execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
[0010] In a second aspect, the present application further provides an information processing device, the device comprising:
[0011] A receiving module, used to receive initial information of a target object; wherein the initial information includes an information identifier;
[0012] A determination module, used to determine a target information conversion task that matches the information identifier, wherein the target information conversion task corresponds to M information conversion units, where M is a positive integer;
[0013] An acquisition module, used to acquire the intermediate information of the M information conversion units;
[0014] The information conversion module is used to execute the M information conversion units in an execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
[0015] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the embodiments of the present disclosure when executing the computer program.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in any one of the embodiments of the present disclosure are implemented.
[0017] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the embodiments of the present disclosure.
[0018] The above-mentioned information processing method and related device, when performing information processing, obtain the initial information of the target object, and determine the matching target information conversion task according to the information identifier in the initial information, obtain the intermediate information of the M information conversion units corresponding to the target information conversion task, and execute the M information conversion units in the execution order to perform information conversion processing on the M information conversion units to obtain the target information, thereby realizing the conversion processing of the information. Through the configuration of the information conversion unit and the information conversion task, a more fine-grained division of the information processing flow is realized. Under different information processing demand scenarios, through the setting of the information conversion unit, the logic reuse of information processing can be realized, and repeated development or repeated configuration of processing logic can be avoided, effectively improving the information processing efficiency and the configuration flexibility of the information conversion task. Further, when receiving information under different demand scenarios, the information can be automatically processed, realizing real-time dynamic control of information processing, improving the flexibility of information processing, and being applicable to more application scenarios. In this embodiment, the configuration of the information conversion unit and the information conversion task is decoupled from the information processing process, and the task configuration and execution are isolated from each other and do not affect each other, thereby ensuring the stability and reliability of information processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 is a flowchart of an information processing method in an embodiment;
[0021] Figure 2 is a flowchart of an information processing method in another embodiment;
[0022] Figure 3 is a flowchart of an information processing method in another embodiment;
[0023] Figure 4 is a flowchart of an information processing method in another embodiment;
[0024] Figure 5 is a flowchart of an information processing method in another embodiment;
[0025] Figure 6 is a schematic diagram of the architecture of an information processing system in one embodiment;
[0026] Figure 7 is a structural block diagram of an information processing device in one embodiment;
[0027] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] With the rapid development of the Internet, the services of various Internet industries have become more refined. In order to meet the needs of refined services, it is necessary to obtain the required information after processing and conversion based on user information, user behavior, environmental information, device information and other related information, and provide personalized services to users based on this information. Due to the large amount of data in the Internet industry, it is particularly important to carry out refined control of the information conversion process.
[0030] However, related technologies usually only focus on how information is processed, such as using templates, SQL statements, dynamic configuration functions, etc., which generally process specific information, have poor flexibility and low efficiency.
[0031] In order to solve the above technical problems, in this solution, when performing information processing, the initial information of the target object is obtained, and the matching target information conversion task is determined according to the information identifier in the initial information, the intermediate information of the M information conversion units corresponding to the target information conversion task is obtained, and the M information conversion units are executed in an execution order to perform information conversion processing on the M information conversion units to obtain the target information, thereby realizing the conversion processing of the information, and obtaining other required information according to the obtained information, effectively improving the information processing efficiency and the configuration flexibility of the information conversion task; and when receiving information in different demand scenarios, it can automatically process the information, realizing real-time dynamic control of information processing, improving the flexibility of information processing, and being suitable for more application scenarios.
[0032] The following is an introduction to some nouns and technical terms involved in the present disclosure. It should be noted that the purpose of explaining the terms described in the present disclosure is to facilitate a more accurate understanding of the innovative technical content of the present solution.
[0033] The initial information may be information associated with the target object and used to obtain other information after information processing; the target information conversion task includes tasks that require the participation of the initial information when performing information conversion processing; the information conversion unit is used to perform a part of the calculation process in the target information conversion task; the intermediate information may be other information other than the initial information in the information required for the calculation corresponding to the M information conversion units; the target information may be the information obtained after performing the target conversion task based on the initial information.
[0034] In one embodiment, Figure 1 As shown, an information processing method is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0035] Step S110, receiving initial information of the target object; wherein the initial information includes an information identifier;
[0036] Exemplarily, different information conversion scenarios may correspond to different target objects. For example, the target object may be a user; the target object may also be a resource interaction account, etc., which may be specifically determined according to the actual application scenario.
[0037] The initial information may be information associated with the target object, such as the attribute information of the target object, the environment information of the target object, the behavior information of the target object, the device information of the target object, etc., which may be determined according to the actual application scenario. Optionally, the initial information includes an information identifier, which may include the name of the information, and the information identifier may include but is not limited to a tag; in an example, the initial information may also include an information value, which may include a value corresponding to the information representation, etc.
[0038] For example, the target object is a 30-year-old user, the initial information is age information, the information identifier is age, and the corresponding information value is 30.
[0039] In one example, it can be determined whether the initial information of the target object is received by monitoring the information changes in the database. The database can include, but is not limited to, a relational database, a non-relational database, such as MySQL, HBase database, etc.
[0040] Step S120, determining a target information conversion task that matches the information identifier, the target information conversion task corresponding to M information conversion units;
[0041] Exemplarily, a target information conversion task is determined according to the information identifier, wherein the target information conversion task includes a task that requires the initial information to participate in performing information conversion processing. The target information conversion task may include one or more, and the initial information may match one or more information conversion tasks.
[0042] In one example, it is possible to determine whether the initial information of the target object is received by monitoring the information in the database; when the initial information is received in the database, matching is performed based on the initial information to determine whether there is a target information conversion task that matches it, and subsequent information processing is performed.
[0043] The target information conversion task corresponds to M information conversion units, where M is a positive integer, i.e., the target information conversion task may correspond to one or more information conversion units, and each information conversion unit is used to execute a part of the calculation process in the target information conversion task. In one example, the minimum calculation unit, i.e., the candidate information conversion unit, may be set according to the specific application scenario of the information conversion processing. When performing task configuration of the information conversion task, the corresponding candidate information conversion unit is determined as the information conversion unit corresponding to the task according to the calculation process corresponding to the task. In one example, the M information conversion units correspond to an execution order, wherein the execution order of the information conversion units may be determined according to the dependency relationship between the output results of the information conversion units, so that they are executed sequentially in the execution order when performing information conversion.
[0044] For example, the information identifier is age, and the matching target information conversion task includes an age-amount conversion task. The age-amount conversion task includes two information conversion units, one is an age level conversion unit, and the other is an amount conversion unit.
[0045] Step S130, obtaining the intermediate information of the M information conversion units;
[0046] Exemplarily, each information conversion unit corresponds to a calculation logic and information required for calculation, and the intermediate information of the M information conversion units is determined according to the information required for calculation corresponding to each information conversion unit. In one example, the intermediate information of the M information conversion units can be other information in the information required for calculation corresponding to the M information conversion units except the initial information.
[0047] The intermediate information of the M information conversion units is obtained, wherein the intermediate information is information required to perform the target information conversion task. In one example, the information can be stored in a preset message queue, and when the intermediate information is obtained, the intermediate information is searched and obtained from the preset message queue.
[0048] For example, in the age-quota conversion task, the age grade conversion unit is used to convert age into age grade, and the quota conversion unit is used to convert age grade into resource quota. When the quota conversion unit converts, the user's resource remaining amount is also required to be converted. At this time, the intermediate information includes the user's resource remaining amount.
[0049] In an example, as shown in Table 1, the fields corresponding to the information conversion unit may include but are not limited to name, unique number, intermediate information, conversion algorithm, result, and time threshold (i.e., preset threshold), wherein the unique number is an identifier that defines a unique information conversion unit; the intermediate information is used to define the information required by the information conversion algorithm; the information conversion algorithm can be implemented through scripts, SQL (Structured Query Language), template configuration, etc.; the result may include but is not limited to variable code, value, etc., and the corresponding format is [{"code":"", "val":""}]; the time threshold is the maximum time threshold of the unit set according to the actual application scenario, i.e., the preset threshold.
[0050] Table 1
[0051]
[0052] In one example, as shown in Table 2, the information conversion units can be connected in series to define information conversion tasks. The fields corresponding to the information conversion task may include, but are not limited to, task name, task unique number, task priority, task group, task link, time consumption threshold, abnormal number threshold, etc. Among them, the task unique number defines a unique task identifier, the task priority specifies the priority of the task, corresponding to different thread pools, the smaller the value, the higher the priority; the group (i.e., the task identifier) defines which group the task belongs to, which is used to obtain information in batches in the scheduled task; the task link is the multiple information conversion units connected in series corresponding to the task; the time consumption threshold is the set maximum time consumption threshold.
[0053] Table 2
[0054]
[0055] Step S140: Execute the M information conversion units in the execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
[0056] Exemplarily, after obtaining the intermediate information, M information conversion units are executed in sequence according to the execution order to perform information conversion processing on the initial information and the intermediate information to obtain the target information. In one example, the initial information and the intermediate information include information values. When performing information conversion processing, the information values can be calculated to obtain a new information value. At the same time, the new information value corresponds to a new information identifier, thereby obtaining the target information.
[0057] In one example, there is a dependency relationship between the information conversion units, and the M information conversion units can be arranged in an execution order to form a task chain. During execution, the M information conversion units are executed in sequence according to the task chain, and the target information is determined to be obtained based on the output result of the last information conversion unit in the execution order. In one example, it is also possible to determine that the target information is obtained based on the output result of each information conversion unit. In one example, the information may include variables, and the variables include attributes and labels. The attributes have names and values, and the labels are technical level strings.
[0058] For example, in the age quota conversion task, the age and resource remaining amount are converted in the order of first executing the age level conversion unit and then executing the quota conversion unit to obtain the resource quota corresponding to the user.
[0059] Optionally, the target information can be used to determine the target business that matches the target object. In one example, the target information is used to determine the target business that matches the target object. Different needs or different scenarios correspond to different businesses. The association relationship between the business type and the information can be set. When the initial information is received, the target information is obtained after information conversion processing is performed based on the initial information. Based on the association relationship between the business type and the information, the business associated with the target information is determined, that is, the target business.
[0060] In one example, the obtained target information is output to a preset message queue, and the information in the preset message queue can be used for consumption and determination of target services, etc. Exemplarily, the information in the message queue is consumed and stored in a database, and the above steps S110 to S140 are performed again until there is no matching target information conversion task.
[0061] In the disclosed embodiment, when performing information processing, the initial information of the target object is obtained, and the matching target information conversion task is determined according to the information identifier in the initial information, the intermediate information of the M information conversion units corresponding to the target information conversion task is obtained, and the M information conversion units are executed in the execution order to perform information conversion processing on the M information conversion units to obtain the target information, thereby realizing the conversion processing of the information, and obtaining the required other information after the conversion processing of the acquired information. Through the configuration of the information conversion unit and the information conversion task, a more fine-grained division of the information processing flow is realized. Under different information processing demand scenarios, the logical reuse of information processing can be realized through the setting of the information conversion unit, avoiding repeated development or repeated configuration of processing logic, and effectively improving the information processing efficiency and the configuration flexibility of the information conversion task. Further, when receiving information under different demand scenarios, the information can be automatically processed, realizing real-time dynamic control of information processing, improving the flexibility of information processing, and being applicable to more application scenarios. In this embodiment, the configuration of the information conversion unit and the information conversion task is decoupled from the information processing process, and the task configuration and execution are isolated from each other and do not affect each other, thereby ensuring the stability and reliability of information processing.
[0062] In one embodiment, Figure 2 As shown, the obtaining of the intermediate information of the M information conversion units includes:
[0063] Step S131, obtaining the task type of the target information conversion task, and determining the target processing time matching the task type;
[0064] Step S132, in response to the current time reaching the target processing time, obtaining the intermediate information of the M information conversion units.
[0065] In the embodiment of the present disclosure, when acquiring intermediate information, the target processing time is determined according to the task type of the target information conversion task. Exemplarily, different information conversion requirements correspond to different processing times. When configuring the information conversion task, information conversion at different processing times is achieved by setting the task type. In one example, the task type may include but is not limited to scheduled tasks, real-time tasks, etc., and the scheduled tasks may include but are not limited to periodic execution tasks, single execution tasks, etc., which may be determined based on the actual application scenario.
[0066] After determining the target processing time, in response to the current time reaching the target processing time, the information conversion process can be started, thereby obtaining the intermediate information of the M information conversion units. In one example, the target processing time may include one or more, for example, when the target information conversion task is a periodic execution task in a timed task, multiple target processing times can be determined according to a preset period.
[0067] The disclosed embodiment, when performing information conversion, determines the target processing time according to the task type of the target information conversion task, and obtains intermediate information and executes the subsequent processing flow when the target processing time is reached. Thus, information conversion can be performed at different processing times according to different task types, and various needs of information conversion can be met, so as to be applicable to more application scenarios and improve the flexibility of information conversion.
[0068] In one embodiment, Figure 3 As shown, the determining of the target processing time matching the task type includes:
[0069] Step S1311, when the task type of the target information conversion task is a real-time task, determining the target processing time to be the current time;
[0070] Step S1312, when the task type of the target information conversion task is a scheduled task, obtain the processing cycle of the target information conversion task, and determine the target processing time according to the processing cycle.
[0071] In the disclosed embodiment, the target information conversion task includes a real-time task and a scheduled task. In one example, the target information conversion task can be both a real-time task and a scheduled task, that is, it includes two execution modes: real-time execution and scheduled execution.
[0072] Exemplarily, when the task type of the target information conversion task is a real-time task, it can be considered that the task needs to be executed immediately at this time, so the target processing time is determined to be the current time, and the intermediate information is directly obtained at the current time.
[0073] Exemplarily, when the task type of the target information conversion task is a scheduled task, it can be considered that information conversion needs to be performed according to the processing cycle corresponding to the task. The processing cycle corresponding to the target information conversion task is obtained, and the target processing time is determined according to the processing cycle. For example, when the processing cycle corresponding to the target information conversion task is 0:00 every day, the target processing time can be set to 0:00 every day. In one example, the processing cycle of the information conversion task can also be adaptively adjusted according to the resource allocation in the actual application scenario, which can be obtained according to the actual application scenario setting.
[0074] In one example, as shown in Table 3, the information conversion task execution strategy configuration can be performed, and the fields of the execution strategy configuration can include but are not limited to the task unique number, execution mode (i.e., task type), execution time (i.e., target execution time), and execution status. Among them, the task unique number corresponds to the unique number of the task to be executed, the execution mode is scheduled or real-time, the scheduled task in the execution time can specify the execution time or execution cycle, and the execution status is whether it has been executed.
[0075] Table 3
[0076]
[0077] In the embodiment of the present disclosure, when the task type of the target information conversion task is a real-time task, the target processing time is determined to be the current time; when the task type of the target information conversion task is a scheduled task, the target processing time is determined according to the processing cycle corresponding to the target information conversion task, thereby enabling dynamic configuration processing of real-time information processing and scheduled information processing. After receiving initial information, the processing time of information conversion can be dynamically controlled according to the task type of the target information conversion task corresponding to the initial information. This is suitable for a variety of application scenarios, and can uniformly perform information conversion processing according to different information conversion requirements, thereby simplifying the information conversion processing process and improving the efficiency of information conversion.
[0078] In one embodiment, Figure 4 As shown, the obtaining of the intermediate information of the M information conversion units includes:
[0079] Step S133, when the task type of the target information conversion task is a scheduled task, obtaining an intermediate information set of the task group to which the target information conversion task belongs;
[0080] Step S134: determining the intermediate information of the M information conversion units of the target information conversion task from the intermediate information set.
[0081] In the disclosed embodiment, when the task type of the target information conversion task is a scheduled task, information can be acquired in batches.
[0082] Exemplarily, when the task type of the target information conversion task is a scheduled task, the intermediate information set of the task group to which the target information conversion task belongs is obtained. In one example, the task group to which the target information conversion task belongs can be determined by a task identifier, and the same task group corresponds to the same task identifier. The task identifier can be set when configuring the information conversion task.
[0083] Optionally, a task group may include one or more information conversion tasks. When obtaining intermediate information, the intermediate information required by all information conversion tasks in a task group may be uniformly obtained from the database to obtain an intermediate information set. The intermediate information required by the M information conversion units of the target information conversion task may be directly obtained from the intermediate information set.
[0084] In one example, information conversion tasks in the same task group may correspond to the same target processing time.
[0085] In the disclosed embodiment, when the task type of the target information conversion task is a scheduled task, the intermediate information set of the task group to which the target information conversion task belongs is determined, and the intermediate information is directly obtained from the intermediate information set, thereby avoiding multiple queries for the same information in the same task group. The same information only needs to be obtained once, saving system resources and improving information processing efficiency.
[0086] In one embodiment, before obtaining the intermediate information set of the task group to which the target information conversion task belongs, the method further includes:
[0087] The multiple information conversion tasks are grouped according to the information identifiers of the intermediate information of the multiple information conversion tasks; wherein, there is at least one identical information identifier of the intermediate information between any two information conversion tasks in the same task group.
[0088] Exemplarily, multiple information conversion tasks may be grouped to obtain one or more task groups. In one example, when there is at least one intermediate information with the same information identifier between different information conversion tasks, the intermediate information may be acquired once, and therefore, the above information conversion tasks are set to belong to the same task group.
[0089] In a possible implementation, the target processing times of the information conversion tasks in the same task group may also be set to be the same.
[0090] In one example, the information conversion tasks in the same task group may be marked with a task identifier. For example, the task identifier may be set as a group number, and the information conversion tasks in the same task group correspond to the same group number.
[0091] The disclosed embodiment divides information conversion tasks of intermediate information with the same information identifier into the same group. The same task group corresponds to the same intermediate information, so that when performing information conversion processing, the same intermediate information only needs to be obtained once, which effectively saves system resources. The grouping method is simple and easy to implement, and is suitable for more application scenarios.
[0092] In one embodiment, Figure 5 As shown, the M information conversion units are executed in the execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information, including:
[0093] Step S141, determining the processing priority of the target information conversion task;
[0094] Step S142, determining an execution thread from the target thread pool of the processing priority;
[0095] Step S143: Utilize the execution thread to execute the M information conversion units in an execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
[0096] In the disclosed embodiment, different information conversion tasks correspond to different processing priorities. Exemplarily, the processing priority corresponding to the target information conversion task is determined, and the target thread pool is determined according to the processing priority. The execution thread is determined from the target thread pool, and the execution thread is used to execute M information conversion units in sequence according to the execution order to convert the initial information and the intermediate information to obtain the target information. In one example, different thread pools are independent and isolated from each other. In one example, the execution thread can be an idle thread determined from the target thread pool.
[0097] In one example, different processing priorities correspond to different thread pools, and different thread pools have different parameter sizes. Exemplarily, the higher the processing priority, the higher the timeliness requirement of the information conversion task can be considered, and the greater the throughput of the corresponding thread pool; the lower the processing priority, the lower the timeliness requirement of the information conversion task can be considered, and the smaller the throughput of the corresponding thread pool. In one example, the throughput can be adjusted by adjusting the parameters of the thread pool, wherein the parameters of the thread pool may include but are not limited to the number of core threads, the maximum number of threads, the number of thread queues, etc.
[0098] In one possible implementation, the parameters of the thread pool can be adjusted dynamically. In one example, the thread pool parameters can be adjusted by timed adjustment tasks, that is, setting different time points to adjust the thread pool parameters according to a preset adjustment method; in another example, the thread pool parameters can be adjusted manually, that is, manually adjusting the corresponding thread pool parameters. Exemplarily, the application example is not restarted during the adjustment, so as to achieve the purpose of changing the thread parameters in real time and taking effect immediately.
[0099] In the disclosed embodiment, when performing information conversion, an execution thread is determined from the corresponding target thread pool according to the processing priority corresponding to the target information conversion task, and the execution thread is used to execute M information conversion units to obtain the target information. By defining the priority of the information conversion task and allocating different thread pools, the timeliness requirements of tasks at different levels are met, and the target information with high timeliness requirements can be obtained as soon as possible, meeting business needs, improving the flexibility of information conversion, and being suitable for more application scenarios.
[0100] In one embodiment, the method further comprises:
[0101] In response to the M information conversion units being executed, a target time consumption is obtained, wherein the target time consumption includes the time consumption of any one of the M information conversion units or the total time consumption of the M information conversion units;
[0102] In response to the target time consumption being greater than a preset threshold, determining a warning level of the target time consumption;
[0103] Send a warning message of the warning level.
[0104] In the embodiment of the present disclosure, in response to the completion of the execution of the M information conversion units, the target time consumption is obtained. Exemplarily, the target time consumption may include the time consumption of any one of the M information conversion units, or may include the total time consumption of the M information conversion units, that is, the target time consumption may include two dimensions: the unit dimension and the task dimension.
[0105] In one example, the time consumption data can be analyzed by a separate monitoring system. After the target time consumption is obtained, the target time consumption can be sent to the message queue for monitoring the time consumption, and the corresponding monitoring system will analyze it and send an early warning message. The message queue can include but is not limited to message middleware such as kafka, RocketMQ, RabbitMQ, ActiveMQ, etc.
[0106] Exemplarily, in response to the target time being greater than a preset threshold, it can be considered that the time is long and there may be an abnormality. At this time, the corresponding warning level is determined according to the target time. In one example, the corresponding warning level can be determined according to the proportion of the target time being greater than the preset threshold. For example, when the target time exceeds the preset threshold, the warning level is level two, when the target time exceeds the preset threshold by 10%, the warning level is level one, and when the target time exceeds the preset threshold by 20%, the warning level is level zero. The smaller the level number, the greater the possibility of an abnormality; in another example, the corresponding warning level can be determined according to the target time and the preset duration of different warning levels; the warning level can also be set in other possible ways.
[0107] In an example, different information conversion units may correspond to different preset thresholds, and different information conversion tasks may also correspond to different preset thresholds, which may be specifically set according to actual application scenarios.
[0108] In some possible implementations, it is also possible to monitor abnormal situations during task execution. When task execution fails due to abnormal interruption, timeout, or other execution failures, the task duration and abnormality information can be sent to the monitoring message queue. The monitoring system aggregates the total number of task abnormalities, determines the corresponding warning level based on the total number of abnormalities, and sends a warning message corresponding to the warning level.
[0109] In the embodiment of the present disclosure, when performing information conversion, the time consumed by the information conversion unit will be recorded, and the corresponding warning level will be determined based on the time consumed, and a warning message corresponding to the warning level will be sent to implement the setting of the abnormal level, improve the system warning capability, and avoid the alarm being buried.
[0110] Figure 6 is a schematic diagram of an information processing system according to an exemplary embodiment. Figure 6As shown, the information processing system includes a task management system, an information conversion system, and a monitoring system. Among them, the task management system is used to configure the information conversion unit, and configure the information conversion task according to the information conversion unit and actual needs. The link formed by multiple information conversion units in series is the task link corresponding to the task. In the information conversion system, after receiving the initial information of the target object, the real-time information conversion task matching the initial information is determined. If the task exists, the execution thread is determined from the corresponding thread pool according to the priority corresponding to the task, the task is executed, the target information is obtained, and it is sent to the message queue. When the target information conversion task corresponding to the initial information is a scheduled task, when the target processing time of the scheduled task arrives, the intermediate information required by the task group to which the target information conversion task belongs is obtained according to the grouping of the task, and the intermediate information set is obtained. The corresponding execution threads are determined according to the priorities corresponding to the tasks in the task group, the tasks are executed, the target information is obtained, and it is sent to the message queue. While executing the task, the time consumption and abnormal data are monitored and sent to the monitoring message queue. The monitoring system performs abnormal monitoring and time consumption monitoring, analyzes the time consumption data and abnormal data in the monitoring message queue, and sends the corresponding warning message of the warning level according to the actual scenario to monitor and alarm.
[0111] Exemplarily, in a real-time information conversion scenario, when information conversion is performed, steps 1 to 5 are included.
[0112] Step 1: Check whether the initial information matches the information conversion task to be executed immediately. If so, obtain the intermediate information required by the task. If the information already exists, do not obtain it again; otherwise, end.
[0113] Step 2: According to the priority of the task, it is sent to the corresponding priority queue, triggered by the corresponding priority thread pool, and each information conversion unit is executed according to the task link under the task. Among them, the tasks of different priorities are triggered and executed by the corresponding thread pool, so as to control the resources of tasks of different priorities and ensure that high-priority tasks get more resources. The subsequent information conversion unit node can rely on the output result of the previous information conversion unit. That is, all the information required by the task does not include the information output after the information conversion unit in the task is executed. In one example, multiple priority thread pool workflows are set to parallel execution of tasks of the same priority in the corresponding thread pool. In one example, the tasks in the priority 1 queue are processed by the thread pool of priority 1; the tasks in the priority 2 queue are processed by the thread pool of priority 2, and so on. That is, the processing of tasks in each queue is undertaken by the corresponding independent thread pool, isolated from each other, and the thread pool parameters of high-priority tasks are adjusted to increase their respective parameters by dynamically adjusting the thread pool parameter size (including the number of core threads, the maximum number of threads, the number of thread queues, etc.) (correspondingly, the thread pool parameters of low-priority tasks can be adjusted to reduce the throughput) to increase the throughput and give priority to the completion of high-priority tasks. Thread pool parameters can be adjusted dynamically. Specifically, you can adjust the specified thread pool parameters through scheduled adjustment tasks or manually. The scheduled adjustment task method is to automatically adjust to the specified parameters by setting different time points; the manual method is to manually adjust the corresponding thread pool parameters. The application instance will not be restarted during the adjustment, so that the thread parameters can be changed in real time and take effect immediately.
[0114] Step 3: Combine the results of each information conversion unit node into the result of task execution, that is, the target information, output it to the message queue, and send the recorded time consumption to the message queue for monitoring time consumption. A separate monitoring system analyzes the time consumption data and issues an alarm in time according to the configured threshold. The time consumption data includes two dimensions: task dimension and unit dimension, that is, the time consumption of the task and the execution time consumption of each information conversion unit.
[0115] In addition, for failed tasks, the task and its duration and exception information are sent to the monitoring message queue. The monitoring system aggregates the total number of task exceptions and sends different levels of alarms based on the number of exceptions.
[0116] Step 4: Consume the information in the message queue, store it in a database (including but not limited to MySQL / hbase, etc.), and execute step 1 again until there are no tasks to be executed.
[0117] Step 5: Receive monitoring message queue data, save the task time and the information conversion unit time under the task respectively, and determine whether the time exceeds the set threshold. If it exceeds, a level 2 alarm is issued. When the time exceeds the threshold by 10%, a level 1 alarm is issued. When the time exceeds the threshold by 20%, a level 0 alarm is issued. Save task exception information, aggregate the total number of task exceptions, and send different levels of alarms according to different abnormal times. The number of task exceptions can be set through configuration, and the lowest level 2 alarm is sent. If it exceeds 10%, a level 1 alarm is sent, and if it exceeds 20%, a level 0 alarm is sent. Among them, the alarm level can be configured according to the actual application scenario, which can be other levels of alarms.
[0118] In a scheduled scenario, after a scheduled task is triggered, retrieve the tasks that need to be executed before the current time point but have not been executed yet, and group them according to the task group code (i.e. task identifier), and query the information required for tasks with the same group code in a unified manner. Execute steps 2 to 5 above.
[0119] The disclosed embodiment realizes logic reuse by defining information conversion units and information conversion tasks, avoids repeated development or repeated configuration of processing logic, and improves system operation efficiency; by dynamically configuring information conversion units and information conversion tasks, information conversion can be dynamically controlled in real time, and the scalability of the system is improved; by defining information conversion task groups, it is realized that tasks in the same group only need to obtain intermediate information once, and multiple queries for the same information are avoided, saving system resources; by defining information conversion task priorities, the timeliness requirements of tasks of different levels are met, and tasks with high timeliness requirements can be processed and applied to business as soon as possible; by decoupling the task execution system, the monitoring system, and the task configuration system, task execution, monitoring, and configuration are isolated from each other and do not affect each other, thereby improving system stability and robustness; by asynchronously sending the task time consumption to the message queue, task execution and task monitoring are decoupled to avoid monitoring affecting task execution; by setting different time consumption and abnormal number threshold ratios, different levels of alarms are issued to achieve abnormal level improvement, improve the system early warning capability, and avoid alarms being buried.
[0120] Table 4 is configuration information of an information conversion unit according to an exemplary embodiment. Referring to Table 4, an age grade unit and a quota unit may be set. The age grade unit is used to calculate the grade to which the age belongs according to the age, and the quota unit is used to calculate the corresponding quota according to the grade to which the age belongs.
[0121] Table 4
[0122]
[0123] Table 5 shows the information conversion tasks configured according to the age grade unit and the quota unit, including the age grade conversion task, the quota conversion task, and the age quota conversion task.
[0124] Table 5
[0125]
[0126] Table 6 shows the execution configuration of the above tasks, in which the age level conversion task is executed both in real time and on a scheduled basis, and the quota conversion task and age quota conversion task are executed on a scheduled basis.
[0127] Table 6
[0128]
[0129] Referring to Tables 4 to 6, when the initial information age=30 is received, the real-time execution task corresponding to the initial information age is queried as task1; all the information conversion units required by the task are op1, and the information required by op1 is obtained, that is, age, and no other information is required, so there is no need to query again; the task information and the initial information age=30 are assembled into a message and sent to the priority queue, and the thread pool with priority 1 (because the priority of the task is 1) consumes the message in the queue and executes the information conversion unit op1, and obtains the target information level=2, which is forwarded to the message queue, and the task execution time of 500ms is forwarded to the monitoring message queue; the information level=2 is received, and no real-time execution task is found for the information, so it ends; the monitoring system receives the time taken for task1, which is 500ms, and no processing is performed because the time taken does not exceed the threshold.
[0130] When executing scheduled tasks, the scheduled task at 01:00:01 in the morning triggers a query for tasks that need to be executed but have not been executed before 01:00:01 today, which are task1, task3, and task2; according to the group coding of these three tasks, the intermediate information required by the tasks with the same group coding is queried once, that is, the intermediate information age required by task1 and task3 is queried once (the group coding of task1 and task3 is the same), and the intermediate information level required by task2 is queried once; according to the task priority, they are sent to the corresponding priority queues respectively, that is, task1 is sent to the priority 1 queue, task2 is sent to the priority 2 queue, and task3 is sent to the priority 3 queue. The corresponding priority 1 thread pool, priority 2 thread pool, and priority 3 thread pool consume and execute the tasks. The task execution result, that is, the target information, is forwarded to the message queue, that is, level and amomut are forwarded to the message queue. The execution times of the three tasks, task1 taking 500ms, task2 taking 2s, and task taking 3s, are forwarded to the monitoring message queue, as well as the execution time of the information conversion unit under the corresponding task; when the information level or amount is received, there is no corresponding task that needs to be executed immediately; the monitoring system receives the time consumption of the three tasks, and because the time consumption of task2 and task3 exceeds the threshold, an alarm is issued to inform the time consumption of task2 and task3.
[0131] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0132] Based on the same inventive concept, the embodiment of the present application also provides an information processing device for implementing the above-mentioned information processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the one or more information processing device embodiments provided below can refer to the limitations on the information processing method above, and will not be repeated here.
[0133] In an exemplary embodiment, Figure 7 As shown, an information processing device 700 is provided, the device comprising:
[0134] The receiving module 710 is used to receive the initial information of the target object; wherein the initial information includes an information identifier;
[0135] A determination module 720 is used to determine a target information conversion task that matches the information identifier, wherein the target information conversion task corresponds to M information conversion units, where M is a positive integer;
[0136] An acquisition module 730, configured to acquire intermediate information of the M information conversion units;
[0137] The information conversion module 740 is used to execute the M information conversion units in an execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
[0138] In one embodiment, the acquisition module includes:
[0139] A first determination submodule is used to obtain the task type of the target information conversion task and determine the target processing time that matches the task type;
[0140] The first acquisition submodule is used to acquire the intermediate information of the M information conversion units in response to the current time reaching the target processing time.
[0141] In one embodiment, the first determining submodule includes:
[0142] A first determining unit, configured to determine the target processing time as the current time when the task type of the target information conversion task is a real-time task;
[0143] The second determining unit is used to obtain the processing cycle of the target information conversion task when the task type of the target information conversion task is a scheduled task, and determine the target processing time according to the processing cycle.
[0144] In one embodiment, the acquisition module includes:
[0145] A second acquisition submodule is used to acquire the intermediate information set of the task group to which the target information conversion task belongs when the task type of the target information conversion task is a scheduled task;
[0146] The second determining submodule is used to determine the intermediate information of the M information conversion units of the target information conversion task from the intermediate information set.
[0147] In one embodiment, the device further comprises:
[0148] The grouping module is used to group multiple information conversion tasks according to the information identifiers of the intermediate information of the multiple information conversion tasks; wherein, there is at least one identical information identifier of the intermediate information between any two information conversion tasks in the same task group.
[0149] In one embodiment, the information conversion module includes:
[0150] A third determination submodule is used to determine the processing priority of the target information conversion task;
[0151] A fourth determination submodule, used to determine an execution thread from the target thread pool of the processing priority;
[0152] The execution submodule is used to use the execution thread to execute the M information conversion units in an execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
[0153] In one embodiment, the device further comprises:
[0154] A third acquisition submodule is used to acquire a target time consumption in response to the completion of the execution of the M information conversion units, wherein the target time consumption includes the time consumption of any information conversion unit of the M information conversion units or the total time consumption of the M information conversion units;
[0155] A fifth determination submodule, configured to determine a warning level of the target time consumption in response to the target time consumption being greater than a preset threshold;
[0156] The sending module is used to send a warning message of the warning level.
[0157] Each module in the above information processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0158] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store initial information and other data involved in the method described in this embodiment. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an information processing method is implemented.
[0159] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0160] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0161] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0162] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0163] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0164] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0165] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0166] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An information processing method, characterized in that: The method comprises: Receiving initial information of a target object; wherein the initial information includes an information identifier; Determine a target information conversion task that matches the information identifier, wherein the target information conversion task corresponds to M information conversion units, where M is a positive integer; Acquire the intermediate information of the M information conversion units; The M information conversion units are executed in an execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
2. The method according to claim 1, characterized in that The obtaining of the intermediate information of the M information conversion units includes: Acquire the task type of the target information conversion task, and determine the target processing time that matches the task type; In response to the current time reaching the target processing time, the intermediate information of the M information conversion units is acquired.
3. The method according to claim 2, characterized in that The determining of the target processing time matching the task type comprises: In the case where the task type of the target information conversion task is a real-time task, determining the target processing time to be the current time; In the case where the task type of the target information conversion task is a scheduled task, the processing cycle of the target information conversion task is acquired, and the target processing time is determined according to the processing cycle.
4. The method according to claim 1, characterized in that: The obtaining of the intermediate information of the M information conversion units includes: In the case where the task type of the target information conversion task is a scheduled task, obtaining an intermediate information set of the task group to which the target information conversion task belongs; From the intermediate information set, intermediate information of the M information conversion units of the target information conversion task is determined.
5. The method according to claim 4, characterized in that Before obtaining the intermediate information set of the task group to which the target information conversion task belongs, the method further includes: The multiple information conversion tasks are grouped according to the information identifiers of the intermediate information of the multiple information conversion tasks; wherein, there is at least one identical information identifier of the intermediate information between any two information conversion tasks in the same task group.
6. The method according to claim 1, characterized in that The executing the M information conversion units in the execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information includes: Determining the processing priority of the target information conversion task; Determining an execution thread from a target thread pool of the processing priority; The M information conversion units are executed in an execution order by utilizing the execution thread to perform information conversion processing on the initial information and the intermediate information to obtain target information.
7. The method according to claim 1, characterized in that The method further comprises: In response to the M information conversion units being executed, a target time consumption is obtained, wherein the target time consumption includes the time consumption of any one of the M information conversion units or the total time consumption of the M information conversion units; In response to the target time consumption being greater than a preset threshold, determining a warning level of the target time consumption; Send a warning message of the warning level.
8. An information processing device, characterized in that: The device comprises: A receiving module, used to receive initial information of a target object; wherein the initial information includes an information identifier; A determination module, used to determine a target information conversion task that matches the information identifier, wherein the target information conversion task corresponds to M information conversion units, where M is a positive integer; An acquisition module, used to acquire the intermediate information of the M information conversion units; The information conversion module is used to execute the M information conversion units in an execution order to perform information conversion processing on the initial information and the intermediate information to obtain target information.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
