Component category identification method, device and computer equipment
By testing the execution time of components in 5G and 4G environments and determining the category of components, the problem of component transmission timeout in 4G environment is solved, and the normal operation of components in different network environments is achieved.
Patent Information
- Application Number
- CN202010123859.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-27
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2040-02-27
AI Technical Summary
In a 4G network environment, components cannot operate normally due to transmission timeout, resulting in business processes interruptions or distortion of execution results. A method is needed to identify the category of components to adapt to different network environments.
By obtaining the test execution time of the target component in 5G and 4G environments, and combining the target execution time, determine the category of the component. The specific method includes obtaining the duration of data transmission and result return, and determining the category of components based on these durations.
It realizes accurate identification of component categories, ensures that components can operate normally in different network environments, and avoids business interruptions and distortion of execution results due to transmission timeouts.
Smart Images

Figure CN113259962B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile communication technology, and in particular to a component category identification method, device and computer equipment. Background Art
[0002] Many components in the terminal device need to communicate with the server. The component sends the relevant data to the server through the wireless network. The server processes the relevant data and returns the execution result to the component. In this process, due to the large amount of data that needs to be transmitted by the wireless network, if the 4G network is used for transmission, it will often cause transmission timeouts and the business process cannot continue to execute, or the execution results will be seriously distorted due to transmission timeouts. The data transmission speed of the 5G network is much faster than that of the 4G network. Therefore, although transmission timeouts may occur through the 4G network, such problems may not occur when transmitting through the 5G network.
[0003] That is to say, the same component can run well in a 4G environment and can also run well in a 5G environment. However, a component that can run well in a 5G environment may not run well in a 4G environment due to timeout. Therefore, a method is urgently needed to identify the category of the component. Summary of the invention
[0004] Based on this, it is necessary to propose a component category identification method, device and computer equipment for identifying component categories in order to solve the above problems.
[0005] In a first aspect, a method for identifying a component category is provided, the method comprising:
[0006] Get the target execution time of the target component in the 5G environment;
[0007] Obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment;
[0008] Determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment.
[0009] In one embodiment, obtaining the test execution duration of the target component in the 5G environment includes: obtaining the data sending duration corresponding to the target component sending data to the server in the 5G environment; obtaining the result return duration corresponding to the execution result returned by the server when the target component receives the data in the 5G environment; and determining the test execution duration of the target component in the 5G environment according to the data sending duration and the result return duration.
[0010] In one embodiment, determining the test execution duration of the target component in a 5G environment according to the data sending duration and the result return duration includes: obtaining data processing duration, where the data processing duration is the duration for the server to process the data received from the target component; determining the test execution duration of the target component in a 5G environment according to the data sending duration, the result return duration and the data processing duration.
[0011] In one embodiment, obtaining the data sending duration corresponding to the target component sending data to the server in a 5G environment includes: obtaining the successful sending duration and the failed sending duration corresponding to the target component sending data to the server in the 5G environment; obtaining the data sending duration corresponding to the target component sending data to the server in the 5G environment according to the successful sending duration and the failed sending duration.
[0012] In one embodiment, obtaining the test execution time of the target component in the 5G environment includes: obtaining the maximum data transmission volume corresponding to the target component; and determining the test execution time of the target component in the 5G environment based on the maximum data transmission volume.
[0013] In one embodiment, obtaining the target execution time of the target component in the 5G environment includes: obtaining the business type of the target component; and determining the target execution time of the target component in the 5G environment according to the business type.
[0014] In one embodiment, the category of the target component is determined according to the target execution time, the test execution time of the target component in a 5G environment, and the test execution time of the target component in a 4G environment, including: if the test execution time of the target component in a 4G environment is less than the target execution time and the test execution time of the target component in a 5G environment is less than or equal to the target execution time, then the category of the target component is the 4G category; if the test execution time of the target component in a 4G environment is greater than the target execution time and the test execution time of the target component in a 5G environment is less than or equal to the target execution time, then the category of the target component is the 5G category.
[0015] In a second aspect, a device for identifying a component category is provided, comprising:
[0016] The first acquisition module is used to obtain the target execution time of the target component in the 5G environment;
[0017] A second acquisition module is used to obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment;
[0018] A category determination module is used to determine the category of the target component based on the target execution time, the test execution time of the target component in a 5G environment, and the test execution time of the target component in a 4G environment.
[0019] In one embodiment, the second acquisition module includes: a sending duration module, used to obtain the data sending duration corresponding to the target component sending data to the server in the 5G environment; a return duration module, used to obtain the result return duration corresponding to the execution result returned by the server when the target component receives the data in the 5G environment; a sending return module, used to determine the test execution duration of the target component in the 5G environment according to the data sending duration and the result return duration.
[0020] In one embodiment, the sending and returning module includes: a processing duration module, used to obtain data processing duration, where the data processing duration is the duration for the server to process the data received from the target component; and a combined processing module, used to determine the test execution duration of the target component in a 5G environment based on the data sending duration, the result return duration and the data processing duration.
[0021] In one embodiment, the sending duration module includes: a success and failure acquisition module, used to obtain the successful sending duration and failed sending duration corresponding to the target component sending data to the server in a 5G environment; a success and failure calculation module, used to obtain the data sending duration corresponding to the target component sending data to the server in a 5G environment based on the successful sending duration and failed sending duration.
[0022] In one embodiment, the second acquisition module includes: a maximum transmission volume module, used to obtain the maximum data transmission volume corresponding to the target component; and a transmission volume duration module, used to determine the test execution duration of the target component in the 5G environment according to the maximum data transmission volume.
[0023] In one embodiment, the first acquisition module includes: a type acquisition module, used to obtain the business type of the target component; and a type duration module, used to determine the target execution duration of the target component in a 5G environment according to the business type.
[0024] In one embodiment, the category determination module includes: a 4G category module, which is used to determine that the category of the target component is 4G category if the test execution time of the target component in the 4G environment is less than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time; and a 5G category module, which is used to determine that the category of the target component is 5G category if the test execution time of the target component in the 4G environment is greater than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time.
[0025] In a third aspect, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0026] Get the target execution time of the target component in the 5G environment;
[0027] Obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment;
[0028] Determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment.
[0029] In a fourth aspect, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0030] Get the target execution time of the target component in the 5G environment;
[0031] Obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment;
[0032] Determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment.
[0033] Implementing the embodiments of the present invention will have the following beneficial effects:
[0034] The present invention proposes a component category identification method, device and computer equipment, firstly obtaining the target execution time of the target component in the 5G environment; then obtaining the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment; finally determining the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment. It can be seen that through the above method, not only the category of the component is determined, but the category of the component is determined only according to the execution time, the implementation method is simple, and it is conducive to industrialization. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] in:
[0037] Figure 1 A schematic diagram of an implementation flow of a method for identifying a component category in an embodiment;
[0038] Figure 2 1 is a schematic diagram of an implementation flow of step 104 in one embodiment;
[0039] Figure 3 1 is a schematic diagram of the implementation process of step 104A in one embodiment;
[0040] Figure 4 1 is a schematic diagram of an implementation flow of step 104 in one embodiment;
[0041] Figure 5 1 is a schematic diagram of an implementation flow of step 102 in an embodiment;
[0042] Figure 6 1 is a schematic diagram of an implementation flow of step 106 in one embodiment;
[0043] Figure 7 is a structural block diagram of a device for identifying component categories in one embodiment;
[0044] Figure 8 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] In one embodiment, a method for identifying component categories is provided. The execution subject of the method for identifying component categories described in the embodiment of the present invention is a device capable of implementing the method for identifying component categories described in the embodiment of the present invention. The device may include but is not limited to a terminal and a server. Among them, the terminal includes a desktop terminal and a mobile terminal. The desktop terminal includes but is not limited to a desktop computer and a car computer; the mobile terminal includes but is not limited to a mobile phone, a tablet, a laptop computer and a smart watch. The server includes a high-performance computer and a high-performance computer cluster.
[0047] like Figure 1 As shown, the component category identification method described in the embodiment of the present invention specifically includes:
[0048] Step 102, obtain the target execution time of the target component in the 5G environment.
[0049] The component includes an application or a module in an application for realizing a certain function. The target component is a component whose type is to be determined.
[0050] Among them, the execution time reflects the time required for the component to realize its function.
[0051] Among them, the target execution time reflects the time requirement that the target component must meet to realize its function. It is understandable that for some components, there are execution time requirements, such as the face recognition component in the attendance application environment. Since attendance needs to be completed by recognizing the face, it is obvious that users cannot wait too long, otherwise the attendance progress will be delayed. Usually, it is more reasonable to set the entire recognition process to 2 seconds. That is to say, when the target component is the face recognition component, the target execution time is 2 seconds.
[0052] In an embodiment of the present invention, the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment are obtained, so that the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment are respectively compared with the target execution time, and then the category of the target component is determined.
[0053] Step 104, obtaining the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment.
[0054] The test execution time is the execution time obtained by testing the target component in a 5G environment.
[0055] The purpose of the test is mainly to determine the type of component. Since different components need to transmit different amounts of data, some components can quickly complete data transmission in a 4G environment, while some components need to quickly complete data transmission in a 5G environment. Therefore, it is necessary to test these components to obtain their execution time in different environments, and then determine the component type based on their execution time in different environments.
[0056] Step 106, determining the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment.
[0057] The test execution time of the target component in the 5G environment and the test execution time in the 4G environment are compared with the target execution time respectively to determine the category of the target component.
[0058] The above component category identification method first obtains the target execution time of the target component in the 5G environment; then obtains the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment; finally, the category of the target component is determined according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment. It can be seen that through the above method, not only the category of the component is determined, but the category of the component is only determined based on the execution time, the implementation method is simple, and it is conducive to industrialization.
[0059] In one embodiment, since the component needs to interact with the server, the difference between the 4G component and the 5G component is mainly the transmission speed. Therefore, the test execution time is determined according to the data transmission time and the result return time. Figure 2 As shown, step 104 of obtaining the test execution time of the target component in the 5G environment includes:
[0060] Step 104A, obtain the data sending duration corresponding to the target component sending data to the server in the 5G environment.
[0061] The data transmission duration is the time it takes for the target component to send data in a 5G environment and for the data to reach the server. For example, if the target component sends data at 10:30:30, and the data reaches the server and is received by the server at 10:30:31, the data transmission duration is 1 second.
[0062] Step 104B, obtain the result return time corresponding to the execution result returned by the server when the target component receives the execution result in the 5G environment.
[0063] The result return time is the time it takes for the server to send the execution result and for the sent execution result to reach the target component. For example, if the server sends the execution result at 10:30:30 and the sent execution result reaches and is received by the target component at 10:30:32, the result return time is 2 seconds.
[0064] Step 104C, determining the test execution duration of the target component in the 5G environment based on the data sending duration and the result return duration.
[0065] The sum of the data sending time and the result return time is used as the test execution time of the target component in the 5G environment. For example, if the data sending time is 1 second and the result return time is 2 seconds, the test execution time is 3 seconds.
[0066] The steps for obtaining the test execution time of the target component in the 4G environment and the test execution time of the target component in the 5G environment are the same, specifically, including: obtaining the data sending time corresponding to the target component sending data to the server in the 4G environment; obtaining the result return time corresponding to the execution result returned by the server when the target component receives the data in the 4G environment; determining the test execution time of the target component in the 4G environment according to the data sending time of the target component in the 4G environment and the result return time of the target component in the 4G environment. No further details will be given here.
[0067] In one embodiment, since it takes a certain amount of time for the server to process the received data, especially when the amount of data to be processed is relatively large, it takes more time. Therefore, the determination of the test execution time also needs to consider the data processing time of the server. Specifically, the step 104C determines the test execution time of the target component in the 5G environment according to the data sending time and the result return time, including:
[0068] Obtaining data processing time, where the data processing time is the time it takes for the server to process the data received and sent by the target component;
[0069] Determine the test execution duration of the target component in the 5G environment based on the data sending duration, the result return duration and the data processing duration.
[0070] The data processing time is the time from when the server starts to process the received data to when the data processing is completed. For example, if the server starts to process the data at 10:30:30 and completes the data processing at 10:30:31, the data processing time is 1 second.
[0071] The sum of the data sending time, result return time, and data processing time is taken as the test execution time. For example, if the data sending time is 1 second, the result return time is 2 seconds, and the data processing time is 1 second, the test execution time is 4 seconds.
[0072] The test execution time in the 4G environment is also determined according to the data processing time, and the specific execution steps are the same as those in the 5G environment, including: obtaining the data processing time, which is the time it takes for the server to process the data sent by the target component; determining the test execution time of the target component in the 4G environment according to the data sending time of the target component in the 4G environment, the result return time of the target component in the 4G environment, and the data processing time. No further details will be given here.
[0073] In one embodiment, data transmission includes successful data transmission and failed data transmission, and the biggest improvement of 5G over 4G is the transmission speed of the wireless network. Therefore, when calculating the data transmission duration, the successful transmission duration and the failed transmission duration need to be considered. Figure 3 As shown, step 104A obtains the data sending duration corresponding to the target component sending data to the server in the 5G environment, including:
[0074] Step 104A1, obtain the successful sending duration and failed sending duration corresponding to the target component sending data to the server in the 5G environment.
[0075] The successful sending duration refers to the time it takes for data to be sent by the target component and successfully reach the server.
[0076] The failed sending duration refers to the duration during which data is sent by the target component but fails to reach the server successfully.
[0077] Exemplarily, the successful sending duration and the failed sending duration are obtained by averaging. Specifically, obtain multiple successful test sending durations and multiple failed test sending durations of the target component sending data to the server in a 5G environment; obtain the successful sending duration of the target component sending data to the server in a 5G environment based on the multiple successful test sending durations of the target component sending data to the server in a 5G environment; obtain the failed sending duration of the target component sending data to the server in a 5G environment based on the multiple failed test sending durations of the target component sending data to the server in a 5G environment.
[0078] Exemplarily, obtaining the successful sending duration of the target component sending data to the server in the 5G environment according to multiple successful test sending durations of the target component sending data to the server in the 5G environment includes:
[0079] Obtain the number of successful tests in which the target component sends data to the server in a 5G environment; divide the sum of multiple successful test sending durations of the target component sending data to the server in a 5G environment by the number of successful tests to obtain the successful sending duration of the target component sending data to the server in a 5G environment.
[0080] For example, if the successful test sending durations are 1 second, 1.2 seconds, and 0.8 seconds respectively, and the number of successful tests is 3, then the successful sending duration is: 1 second.
[0081] Exemplarily, obtaining the successful sending duration of the target component sending data to the server in the 5G environment according to multiple successful test sending durations of the target component sending data to the server in the 5G environment also includes:
[0082] Obtain the number of successful tests in which the target component sends data to the server in a 5G environment; calculate the geometric mean of multiple successful test sending durations of the target component sending data to the server in a 5G environment based on the number of successful tests; and use the geometric mean as the successful sending duration of the target component sending data to the server in a 5G environment.
[0083] For example, if the successful test sending durations are 1 second and 1.2 seconds respectively, and the number of successful tests is 2, then the successful sending duration is: ((1 2 +1.2 2 ) 1 / 2 ) / 2.
[0084] Exemplarily, obtaining the failed sending duration of the target component sending data to the server in the 5G environment according to multiple failed test sending durations of the target component sending data to the server in the 5G environment includes:
[0085] Obtain the number of failed tests in which the target component sends data to the server in a 5G environment; divide the sum of multiple failed test sending durations of the target component sending data to the server in a 5G environment by the number of failed tests to obtain the failed sending duration of the target component sending data to the server in a 5G environment.
[0086] For example, if the sending durations of the failed test are 1 second, 1.2 seconds, and 0.8 seconds respectively, then the sending duration of the failed test is: 1 second.
[0087] Exemplarily, the obtaining the failed sending duration of the target component sending data to the server in the 5G environment according to multiple failed test sending durations of the target component sending data to the server in the 5G environment also includes:
[0088] Obtain the number of failed tests in which the target component sends data to the server in a 5G environment; calculate the geometric mean of multiple failed test sending durations of the target component sending data to the server in a 5G environment based on the number of failed tests; and use the geometric mean as the failed sending duration of the target component sending data to the server in a 5G environment.
[0089] For example, if the duration of the failed test is 1 second and 1.2 seconds respectively, and the number of failed tests is 2, then the duration of the failed test is: ((1 2 +1.2 2 ) 1 / 2 ) / 2.
[0090] Step 104A2, based on the successful sending duration and the failed sending duration, obtain the data sending duration corresponding to the target component sending data to the server in the 5G environment.
[0091] The successful sending duration and the failed sending duration are summed to obtain the sum duration, and the sum duration is divided by 2 to obtain the data sending duration. For example, the successful sending duration and the failed sending duration are 1 second and 1.2 seconds, respectively, so the data sending duration is 1.1 seconds.
[0092] The steps for obtaining the data transmission duration corresponding to the target component sending data to the server in the 4G environment are the same as those in the 5G environment, specifically, including: obtaining the successful transmission duration and failed transmission duration corresponding to the target component sending data to the server in the 4G environment; obtaining the data transmission duration corresponding to the target component sending data to the server in the 4G environment according to the successful transmission duration and failed transmission duration of the target component in the 4G environment. No further details will be given here.
[0093] In one embodiment, Figure 4 As shown, step 104 of obtaining the test execution time of the target component in the 5G environment includes:
[0094] Step 104a, obtaining the maximum data transmission amount corresponding to the target component.
[0095] Among them, the maximum data transmission amount is the maximum requirement for the amount of data transmitted each time by the target component, that is, the amount of data transmitted each time by the target component cannot exceed the maximum data transmission amount. The maximum data transmission amount is related to the type of component, the performance of the server (the amount of data of each component that the server can process, the processing speed of the server, etc.) and the execution time of the component. For example, the component is a video recognition component, and the video recognition component needs to transmit video to the server, so the amount of data to be transmitted will be relatively large. Therefore, the maximum data transmission amount corresponding to the video recognition component will be relatively large; for another example, the component is a fingerprint recognition component, and the fingerprint recognition component needs to transmit fingerprints to the server. Compared with the video recognition component, the amount of data transmitted by the fingerprint recognition component will be relatively smaller. Therefore, the maximum data transmission amount corresponding to the fingerprint recognition component will be smaller.
[0096] Step 104b, determining the test execution time of the target component in the 5G environment according to the maximum data transmission volume.
[0097] Obtain the data transmission network speed corresponding to the 5G environment; divide the maximum data transmission volume by the data transmission network speed to obtain the test execution time of the target component in the 5G environment. For example, the data transmission network speed corresponding to the 5G environment is S, and the maximum data transmission volume is M, so the test execution time T = M / S.
[0098] The steps for obtaining the test execution time of the target component in the 4G environment and the test execution time of the target component in the 5G environment are the same, specifically, including: obtaining the maximum data transmission volume corresponding to the target component; and determining the test execution time of the target component in the 4G environment according to the maximum data transmission volume. No further details are given here.
[0099] In one embodiment, different execution time limits are established for different service types, so that the determination of the execution time limit is more flexible and diversified. Figure 5 As shown, step 102 of obtaining the target execution time of the target component in the 5G environment includes:
[0100] Step 102A, obtaining the business type of the target component.
[0101] The business type is used to indicate the type of business that the target component needs to implement. For example, if the target component is a face recognition component, then the business type of the face recognition component is determined to be a face recognition type; for another example, if the target component is a face attendance component, then the business type of the face attendance component is determined to be a face recognition type; for another example, if the target component is a fingerprint attendance component, then the business type of the fingerprint attendance component is determined to be a fingerprint recognition type.
[0102] Step 102B, determining the target execution time of the target component in the 5G environment according to the business type.
[0103] Pre - establish different execution durations according to different business types. Specifically, generate a type - duration table based on the business type and the corresponding execution duration, as shown in Table 1. The type - duration table is stored in the database. Thus, after determining the business type of the target component, the corresponding execution duration can be obtained by querying the data table in the database.
[0104] Table 1
[0105]
[0106]
[0107] In one embodiment, there are multiple data tables in the database. Each data table stores the execution durations of multiple target components of the same business type. As shown in Table 2, it stores the execution durations of multiple components with the business type YW - 1.
[0108] Table 2
[0109]
[0110] In one embodiment, determine the category of the component by combining the test execution duration in the 4G environment and the test execution duration in the 5G environment. As Figure 6 shown, step 106 of determining the category of the target component according to the target execution duration, the test execution duration of the target component in the 5G environment, and the test execution duration of the target component in the 4G environment includes:
[0111] Step 106A, if the test execution duration of the target component in the 4G environment is less than the target execution duration and the test execution duration of the target component in the 5G environment is less than or equal to the target execution duration, then the category of the target component is the 4G category.
[0112] When the test execution durations in both the 4G environment and the 5G environment are less than the target execution duration, it is considered that both the 4G environment and the 5G environment can meet the requirement of the execution duration of the target component. Therefore, the category of the target component is determined to be the 4G category.
[0113] For example, the test execution duration in the 4G environment is T1, the test execution duration in the 5G environment is T2, and the target execution duration is T. If T1 < T and T2 < T, then the category of the target component is the 4G category.
[0114] Step 106B. If the test execution duration of the target component in a 4G environment is greater than the target execution duration and the test execution duration of the target component in a 5G environment is less than or equal to the target execution duration, then the category of the target component is a 5G category.
[0115] When the test execution duration in a 4G environment is greater than the target execution duration and the test execution duration in a 5G environment is less than the target execution duration, it is considered that the 4G environment cannot meet the requirement of the target component's execution duration, but the 5G environment can meet the requirement of the target component's execution duration. Therefore, the category of the target component is determined to be a 5G category.
[0116] For example, if T1 > T and T2 < T, then the category of the target component is a 5G category.
[0117] In one embodiment, step 106 of determining the category of the target component according to the target execution duration, the test execution duration of the target component in a 5G environment, and the test execution duration of the target component in a 4G environment further includes:
[0118] If the test execution duration of the target component in a 4G environment is greater than the target execution duration and the test execution duration of the target component in a 5G environment is greater than the target execution duration, then a prompt message is generated.
[0119] When the test execution durations in both the 4G environment and the 5G environment are greater than the target execution duration, it is considered that neither the 4G environment nor the 5G environment can meet the requirement of the target component's execution duration. In this case, it is impossible to identify the category of the target component. Therefore, a prompt message is generated to prompt relevant personnel.
[0120] For example, if the test execution duration in a 4G environment is T1, the test execution duration in a 5G environment is T2, and the target execution duration is T, if T1 > T and T2 > T, then a prompt message is generated.
[0121] In one embodiment, a method for identifying a component category is provided, which is applied to a terminal or a server and includes: when an application is installed or started, detecting the network environment type; if the network environment type is a 5G environment type, loading the 5G type components corresponding to the application; if the network environment type is a 4G environment type, loading the 4G type components corresponding to the application; when it is detected that the network environment type switches from a 5G environment type to a 4G environment type, loading the 4G components corresponding to the application; when it is detected that the network environment type switches from a 4G environment type to a 5G environment type, loading the 5G components corresponding to the application.
[0122] Such as Figure 7As shown, a component category identification device 700 is provided, which specifically includes:
[0123] The first acquisition module 702 is used to obtain the target execution time of the target component in the 5G environment;
[0124] The second acquisition module 704 is used to obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment;
[0125] The category determination module 706 is used to determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment.
[0126] The above-mentioned component category identification device first obtains the target execution time of the target component in the 5G environment; then obtains the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment; finally, the category of the target component is determined according to the target execution time, the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment. It can be seen that through the above-mentioned device, not only the category of the component is determined, but the category of the component is determined only according to the execution time, the implementation method is simple, and it is conducive to industrialization.
[0127] In one embodiment, the second acquisition module 704 includes: a sending duration module, used to obtain the data sending duration corresponding to the target component sending data to the server in the 5G environment; a return duration module, used to obtain the result return duration corresponding to the execution result returned by the server when the target component receives the data in the 5G environment; a sending return module, used to determine the test execution duration of the target component in the 5G environment according to the data sending duration and the result return duration.
[0128] In one embodiment, the sending and returning module includes: a processing duration module, used to obtain data processing duration, where the data processing duration is the duration for the server to process the data received from the target component; and a combined processing module, used to determine the test execution duration of the target component in a 5G environment based on the data sending duration, the result return duration and the data processing duration.
[0129] In one embodiment, the sending duration module includes: a success and failure acquisition module, used to obtain the successful sending duration and failed sending duration corresponding to the target component sending data to the server in a 5G environment; a success and failure calculation module, used to obtain the data sending duration corresponding to the target component sending data to the server in a 5G environment based on the successful sending duration and failed sending duration.
[0130] In one embodiment, the second acquisition module 704 includes: a maximum transmission volume module, used to obtain the maximum data transmission volume corresponding to the target component; and a transmission volume duration module, used to determine the test execution duration of the target component in the 5G environment according to the maximum data transmission volume.
[0131] In one embodiment, the first acquisition module 702 includes: a type acquisition module, used to obtain the business type of the target component; and a type duration module, used to determine the target execution duration of the target component in the 5G environment according to the business type.
[0132] In one embodiment, the category determination module 706 includes: a 4G category module, which is used to determine that the category of the target component is 4G category if the test execution time of the target component in the 4G environment is less than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time; and a 5G category module, which is used to determine that the category of the target component is 5G category if the test execution time of the target component in the 4G environment is greater than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time.
[0133] Figure 8 FIG. 1 shows an internal structure diagram of a computer device in an embodiment. The computer device may specifically be a terminal or a server. Figure 8 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement a component category identification method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement a component category identification method. 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.
[0134] In one embodiment, the component category identification method provided in the present application can be implemented in the form of a computer program. The computer program can be used in Figure 8 The computer device shown in the figure is run. The memory of the computer device can store various program templates constituting the component category identification device, such as the first acquisition module 702, the second acquisition module 704 and the category determination module 706.
[0135] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:
[0136] Get the target execution time of the target component in the 5G environment;
[0137] Obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment;
[0138] Determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment.
[0139] The above-mentioned computer device first obtains the target execution time of the target component in the 5G environment; then obtains the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment; finally, the category of the target component is determined according to the target execution time, the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment. It can be seen that through the above-mentioned computer device, not only the category of the component is determined, but the category of the component is only determined according to the execution time, the implementation method is simple, and it is conducive to industrialization.
[0140] In one embodiment, obtaining the test execution duration of the target component in the 5G environment includes: obtaining the data sending duration corresponding to the target component sending data to the server in the 5G environment; obtaining the result return duration corresponding to the execution result returned by the server when the target component receives the data in the 5G environment; and determining the test execution duration of the target component in the 5G environment according to the data sending duration and the result return duration.
[0141] In one embodiment, determining the test execution duration of the target component in a 5G environment according to the data sending duration and the result return duration includes: obtaining data processing duration, where the data processing duration is the duration for the server to process the data received from the target component; determining the test execution duration of the target component in a 5G environment according to the data sending duration, the result return duration and the data processing duration.
[0142] In one embodiment, obtaining the data sending duration corresponding to the target component sending data to the server in a 5G environment includes: obtaining the successful sending duration and the failed sending duration corresponding to the target component sending data to the server in the 5G environment; obtaining the data sending duration corresponding to the target component sending data to the server in the 5G environment according to the successful sending duration and the failed sending duration.
[0143] In one embodiment, obtaining the test execution time of the target component in the 5G environment includes: obtaining the maximum data transmission volume corresponding to the target component; and determining the test execution time of the target component in the 5G environment based on the maximum data transmission volume.
[0144] In one embodiment, obtaining the target execution time of the target component in the 5G environment includes: obtaining the business type of the target component; and determining the target execution time of the target component in the 5G environment according to the business type.
[0145] In one embodiment, the category of the target component is determined according to the target execution time, the test execution time of the target component in a 5G environment, and the test execution time of the target component in a 4G environment, including: if the test execution time of the target component in a 4G environment is less than the target execution time and the test execution time of the target component in a 5G environment is less than or equal to the target execution time, then the category of the target component is the 4G category; if the test execution time of the target component in a 4G environment is greater than the target execution time and the test execution time of the target component in a 5G environment is less than or equal to the target execution time, then the category of the target component is the 5G category.
[0146] In one embodiment, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0147] Get the target execution time of the target component in the 5G environment;
[0148] Obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment;
[0149] Determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment.
[0150] The above-mentioned computer-readable storage medium first obtains the target execution time of the target component in the 5G environment; then obtains the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment; finally, the category of the target component is determined according to the target execution time, the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment. It can be seen that through the above-mentioned computer-readable storage medium, not only the category of the component is determined, but the category of the component is only determined according to the execution time, the implementation method is simple, and it is conducive to industrialization.
[0151] In one embodiment, obtaining the test execution duration of the target component in the 5G environment includes: obtaining the data sending duration corresponding to the target component sending data to the server in the 5G environment; obtaining the result return duration corresponding to the execution result returned by the server when the target component receives the data in the 5G environment; and determining the test execution duration of the target component in the 5G environment according to the data sending duration and the result return duration.
[0152] In one embodiment, determining the test execution duration of the target component in a 5G environment according to the data sending duration and the result return duration includes: obtaining data processing duration, where the data processing duration is the duration for the server to process the data received from the target component; determining the test execution duration of the target component in a 5G environment according to the data sending duration, the result return duration and the data processing duration.
[0153] In one embodiment, obtaining the data sending duration corresponding to the target component sending data to the server in a 5G environment includes: obtaining the successful sending duration and the failed sending duration corresponding to the target component sending data to the server in the 5G environment; obtaining the data sending duration corresponding to the target component sending data to the server in the 5G environment according to the successful sending duration and the failed sending duration.
[0154] In one embodiment, obtaining the test execution time of the target component in the 5G environment includes: obtaining the maximum data transmission volume corresponding to the target component; and determining the test execution time of the target component in the 5G environment based on the maximum data transmission volume.
[0155] In one embodiment, obtaining the target execution time of the target component in the 5G environment includes: obtaining the business type of the target component; and determining the target execution time of the target component in the 5G environment according to the business type.
[0156] In one embodiment, the category of the target component is determined according to the target execution time, the test execution time of the target component in a 5G environment, and the test execution time of the target component in a 4G environment, including: if the test execution time of the target component in a 4G environment is less than the target execution time and the test execution time of the target component in a 5G environment is less than or equal to the target execution time, then the category of the target component is the 4G category; if the test execution time of the target component in a 4G environment is greater than the target execution time and the test execution time of the target component in a 5G environment is less than or equal to the target execution time, then the category of the target component is the 5G category.
[0157] It should be noted that the above-mentioned component category identification method, component category identification device, computer equipment and computer-readable storage medium belong to a general inventive concept, and the contents of the component category identification method, component category identification device, computer equipment and computer-readable storage medium embodiments are applicable to each other.
[0158] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0159] 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 specification.
[0160] The above-mentioned 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. A method for identifying a component category, characterized in that: include: Get the target execution time of the target component in the 5G environment; Obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment; Determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment; Determining the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment includes: If the test execution time of the target component in the 4G environment is less than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time, the category of the target component is the 4G category; If the test execution time of the target component in the 4G environment is greater than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time, the category of the target component is the 5G category.
2. The method according to claim 1, characterized in that The obtaining the test execution time of the target component in the 5G environment includes: Obtain the data sending duration corresponding to the target component sending data to the server in the 5G environment; Obtain the result return time corresponding to the execution result returned by the server received by the target component in the 5G environment; The test execution duration of the target component in the 5G environment is determined according to the data sending duration and the result return duration.
3. The method according to claim 2, characterized in that The determining the test execution duration of the target component in the 5G environment according to the data sending duration and the result return duration includes: Obtaining data processing time, where the data processing time is the time it takes for the server to process the data received and sent by the target component; Determine the test execution duration of the target component in the 5G environment based on the data sending duration, the result return duration and the data processing duration.
4. The method according to claim 2, characterized in that The obtaining of the data sending duration corresponding to the target component sending data to the server in the 5G environment includes: Obtain the successful sending duration and failed sending duration corresponding to the target component sending data to the server in the 5G environment; According to the successful sending duration and the failed sending duration, the data sending duration corresponding to the target component sending data to the server in the 5G environment is obtained.
5. The method according to claim 1, characterized in that The obtaining the test execution time of the target component in the 5G environment includes: Obtaining the maximum data transmission amount corresponding to the target component; Determine the test execution time of the target component in the 5G environment based on the maximum data transmission volume.
6. The method according to claim 1, characterized in that The obtaining of the target execution time of the target component in the 5G environment includes: Obtaining the business type of the target component; Determine the target execution time of the target component in the 5G environment according to the business type.
7. A device for identifying component categories, characterized in that: include: The first acquisition module is used to obtain the target execution time of the target component in the 5G environment; A second acquisition module is used to obtain the test execution time of the target component in the 5G environment and the test execution time of the target component in the 4G environment; A category determination module, used to determine the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment; Determining the category of the target component according to the target execution time, the test execution time of the target component in the 5G environment, and the test execution time of the target component in the 4G environment includes: If the test execution time of the target component in the 4G environment is less than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time, the category of the target component is the 4G category; If the test execution time of the target component in the 4G environment is greater than the target execution time and the test execution time of the target component in the 5G environment is less than or equal to the target execution time, the category of the target component is the 5G category.
8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the component category identification method as claimed in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the component category identification method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Network environment testing method and device and terminal equipment
CN110232022A